nitpicks.

This commit is contained in:
Colin Henry 2020-10-23 21:55:48 -07:00
parent 07db4cf999
commit 8a1403a35d
3 changed files with 3 additions and 3 deletions

View File

@ -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{})

View File

@ -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)

View File

@ -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 (