From 3a3b7bd19dfe418446f5295dc4be904add8b36c6 Mon Sep 17 00:00:00 2001 From: hunter007 Date: Wed, 20 Sep 2023 16:03:04 +0800 Subject: [PATCH] Fix Signed-off-by: hunter007 --- go.mod | 2 +- validator.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 9f0e73b..8179d03 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,5 @@ module github.com/hunter007/password -go 1.16 +go 1.13 require golang.org/x/crypto v0.9.0 diff --git a/validator.go b/validator.go index af54d5e..9641295 100644 --- a/validator.go +++ b/validator.go @@ -2,7 +2,7 @@ package password import ( "errors" - "io" + "io/ioutil" "net/http" "strings" "unicode" @@ -38,7 +38,7 @@ func (opt *ValidatorOption) loadCommonPasswords() error { } defer resp.Body.Close() - bs, err := io.ReadAll(resp.Body) + bs, err := ioutil.ReadAll(resp.Body) if err != nil { return err }