]> Sergey Matveev's repositories - godlighty.git/blobdiff - auth.go
io/ioutil is deprecated since Go 1.16
[godlighty.git] / auth.go
diff --git a/auth.go b/auth.go
index 3a950f6f48857940fa30bfd4c22a919660b88820..83428c11142a5976cb5599536d6efaa913ecf6d9 100644 (file)
--- a/auth.go
+++ b/auth.go
@@ -22,8 +22,8 @@ import (
        "encoding/hex"
        "errors"
        "fmt"
-       "io/ioutil"
        "net/http"
+       "os"
        "strings"
 )
 
@@ -36,7 +36,7 @@ func performAuth(w http.ResponseWriter, r *http.Request, cfg *AuthCfg) (string,
                w.WriteHeader(http.StatusUnauthorized)
                return username, Unauthorized
        }
-       data, err := ioutil.ReadFile(cfg.Passwords)
+       data, err := os.ReadFile(cfg.Passwords)
        if err != nil {
                return username, err
        }