diff --git a/client_handlers.go b/client_handlers.go index 4b630f085..c6bc61fc0 100644 --- a/client_handlers.go +++ b/client_handlers.go @@ -28,7 +28,7 @@ func Multiplexer(w http.ResponseWriter, req *http.Request) { //-------------------------------------- // State sensitive handlers -// Set/Delte will dispatch to leader +// Set/Delete will dispatch to leader //-------------------------------------- // Set Command Handler @@ -193,9 +193,9 @@ func MachinesHttpHandler(w http.ResponseWriter, req *http.Request) { // Since peer map does not contain the server itself machines, _ := getClientAddr(raftServer.Name()) - // Add all peers to the list and sepearte by comma + // Add all peers to the list and separate by comma // We do not use json here since we accept machines list - // in the command line seperate by comma. + // in the command line separate by comma. for peerName, _ := range peers { if addr, ok := getClientAddr(peerName); ok { diff --git a/etcd.go b/etcd.go index 6d0c97973..c43178d72 100644 --- a/etcd.go +++ b/etcd.go @@ -165,7 +165,7 @@ func main() { info = getInfo(dirPath) - // secrity type + // security type st := securityType(SERVER) clientSt := securityType(CLIENT) @@ -277,7 +277,7 @@ func startRaft(securityType int) { // Create transporter using by raft server // Create http or https transporter based on -// wether the user give the server cert and key +// whether the user give the server cert and key func createTransporter(st int) transporter { t := transporter{} diff --git a/transporter.go b/transporter.go index 159f015ab..7e1ac56d8 100644 --- a/transporter.go +++ b/transporter.go @@ -89,7 +89,7 @@ func (t transporter) SendSnapshotRequest(server *raft.Server, peer *raft.Peer, r return aersp } -// Get the the client address of the leader in the cluster +// Get the client address of the leader in the cluster func (t transporter) GetLeaderClientAddress() string { resp, _ := t.Get(raftServer.Leader() + "/client") if resp != nil { diff --git a/util.go b/util.go index c5e037e76..ced4b088d 100644 --- a/util.go +++ b/util.go @@ -15,11 +15,11 @@ import ( //-------------------------------------- var storeMsg chan string -// Help to send msg from stroe to webHub +// Help to send msg from store to webHub func webHelper() { storeMsg = make(chan string) for { - // transfere the new msg to webHub + // transfer the new msg to webHub web.Hub().Send(<-storeMsg) } }