From 54113bebd6ce9878d0cb475ef9036d08486d8bea Mon Sep 17 00:00:00 2001 From: guangwu Date: Thu, 28 Sep 2023 20:54:15 +0800 Subject: [PATCH] fix: typo (#44) --- loghub/accesslog.go | 2 +- memcache/protocol.go | 6 +++--- memcache/server.go | 2 +- store/hint.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/loghub/accesslog.go b/loghub/accesslog.go index c12f379..0d7fa91 100644 --- a/loghub/accesslog.go +++ b/loghub/accesslog.go @@ -27,7 +27,7 @@ func InitAccessLog(path string, level int) (err error) { AccessLogger.Hub = hub AccessLogger.SetLevel(level) } else { - log.Fatalf("open accesss log error, path=[%s], err=[%s]", path, err.Error()) + log.Fatalf("open access log error, path=[%s], err=[%s]", path, err.Error()) } return } diff --git a/memcache/protocol.go b/memcache/protocol.go index 3363d76..35622e1 100644 --- a/memcache/protocol.go +++ b/memcache/protocol.go @@ -23,7 +23,7 @@ var ( // or the type of a part if invalid. ErrInvalidCmd = errors.New("invalid cmd") - // ErrNonMemcacheCmd means that the command is not defined in original memcache protocal. + // ErrNonMemcacheCmd means that the command is not defined in original memcache protocol. // refer: https://github.com/memcached/memcached/blob/master/doc/protocol.txt ErrNonMemcacheCmd = errors.New("non memcache command") @@ -36,7 +36,7 @@ var ( // ErrBadDataChunk means that data chunk of a value is not match its size flag. ErrBadDataChunk = errors.New("bad data chunk") - // ErrNetworkError means that a failure happend at reading/writing to a client connection. + // ErrNetworkError means that a failure happened at reading/writing to a client connection. ErrNetworkError = errors.New("network error") ErrOOM = errors.New("memory shortage") @@ -145,7 +145,7 @@ func (req *Request) Write(w io.Writer) (e error) { _, e = io.WriteString(w, "\r\n") default: - logger.Errorf("unkown request cmd: %s", req.Cmd) + logger.Errorf("unknown request cmd: %s", req.Cmd) return errors.New("unknown cmd: " + req.Cmd) } diff --git a/memcache/server.go b/memcache/server.go index 12296d3..10f2449 100644 --- a/memcache/server.go +++ b/memcache/server.go @@ -358,7 +358,7 @@ func (s *Server) HandleSignals(errorlog string, accesslog string, analysislog st } } } else { - logger.Infof("signal recieved " + sig.String()) + logger.Infof("signal received " + sig.String()) s.Shutdown() } } diff --git a/store/hint.go b/store/hint.go index 861bc89..d8f78f7 100644 --- a/store/hint.go +++ b/store/hint.go @@ -668,7 +668,7 @@ func (hm *hintMgr) loadHintsByChunk(chunkID int) (datasize uint32) { var err error for _, p := range paths0 { if err != nil { - logger.Errorf("a failure of loading hint happend before: curr_hint_path=%s", p) + logger.Errorf("a failure of loading hint happened before: curr_hint_path=%s", p) utils.Remove(p) continue }