]> Sergey Matveev's repositories - godlighty.git/blobdiff - auth.go
No CSS
[godlighty.git] / auth.go
diff --git a/auth.go b/auth.go
index 3a950f6f48857940fa30bfd4c22a919660b88820..a38e54cbabad37918fa98a2fcc92059e439e7d98 100644 (file)
--- a/auth.go
+++ b/auth.go
@@ -1,6 +1,6 @@
 /*
 godlighty -- highly-customizable HTTP, HTTP/2, HTTPS server
-Copyright (C) 2021-2022 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2021-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -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
        }