diff --git a/log/logger.go b/log/logger.go index 75ba437..cf35360 100644 --- a/log/logger.go +++ b/log/logger.go @@ -1,6 +1,6 @@ package log -// Logger is a loggin interface with only the essentials that a function that needs to log should care about. Compatible with standard Go logger. +// Logger is a logging interface with only the essentials that a function that needs to log should care about. Compatible with standard Go logger. type Logger interface { Print(v ...interface{}) Printf(format string, v ...interface{}) diff --git a/net/http/auth.go b/net/http/auth.go index f84a366..29c1851 100644 --- a/net/http/auth.go +++ b/net/http/auth.go @@ -20,7 +20,7 @@ func BasicAuth(h http.Handler, htpasswd map[string]string, realm string) http.Ha user, pass, _ := r.BasicAuth() if pw, ok := htpasswd[user]; !ok || !strings.EqualFold(pass, sha1(pw)) { w.Header().Set("WWW-Authenticate", rlm) - http.Error(w, "Unauthorized.", 401) + http.Error(w, "Unauthorized", 401) return } h.ServeHTTP(w, r) diff --git a/net/http/status_handler.go b/net/http/status_handler.go index 6db1d37..2ea1345 100644 --- a/net/http/status_handler.go +++ b/net/http/status_handler.go @@ -11,7 +11,7 @@ type StatusHandler int func (s StatusHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { code := int(s) w.WriteHeader(code) - io.WriteString(w, http.StatusText(code)) + _, _ = io.WriteString(w, http.StatusText(code)) } var (