From 7816118c4f59a738b4cf8af000048bb08ba95ac6 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Sun, 8 Oct 2023 22:37:21 +0800 Subject: [PATCH] chore: remove refs to deprecated io/ioutil --- caddyfile_authn_ui.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/caddyfile_authn_ui.go b/caddyfile_authn_ui.go index 41f999a..f26b164 100644 --- a/caddyfile_authn_ui.go +++ b/caddyfile_authn_ui.go @@ -20,7 +20,7 @@ import ( "github.com/greenpau/caddy-security/pkg/util" "github.com/greenpau/go-authcrunch/pkg/authn" "github.com/greenpau/go-authcrunch/pkg/authn/ui" - "io/ioutil" + "os" "strings" ) @@ -131,7 +131,7 @@ func parseCaddyfileAuthPortalUI(h *caddyfile.Dispenser, repl *caddy.Replacer, po portal.UI.CustomJsPath = strings.ReplaceAll(args, "js ", "") case strings.HasPrefix(args, "html header path"): args = strings.ReplaceAll(args, "html header path ", "") - b, err := ioutil.ReadFile(args) + b, err := os.ReadFile(args) if err != nil { return h.Errf("%s %s subdirective: %s %v", rootDirective, subDirective, args, err) }