diff options
| author | Eng Zer Jun <engzerjun@gmail.com> | 2021-10-14 12:27:58 +0800 |
|---|---|---|
| committer | Eng Zer Jun <engzerjun@gmail.com> | 2021-10-14 12:27:58 +0800 |
| commit | a23bcbb7ecf93fcda35976f4f2fb42a67830e718 (patch) | |
| tree | 3227e82e51346dad8649a17e991c9cf561ef8071 /weed/s3api/auth_credentials.go | |
| parent | 4cbd390fbe634e2370c36a61b1574e9d648c3cee (diff) | |
| download | seaweedfs-a23bcbb7ecf93fcda35976f4f2fb42a67830e718.tar.xz seaweedfs-a23bcbb7ecf93fcda35976f4f2fb42a67830e718.zip | |
refactor: move from io/ioutil to io and os package
The io/ioutil package has been deprecated as of Go 1.16, see
https://golang.org/doc/go1.16#ioutil. This commit replaces the existing
io/ioutil functions with their new definitions in io and os packages.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Diffstat (limited to 'weed/s3api/auth_credentials.go')
| -rw-r--r-- | weed/s3api/auth_credentials.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/weed/s3api/auth_credentials.go b/weed/s3api/auth_credentials.go index cd1b3adfb..998a74625 100644 --- a/weed/s3api/auth_credentials.go +++ b/weed/s3api/auth_credentials.go @@ -2,6 +2,10 @@ package s3api import ( "fmt" + "net/http" + "os" + "strings" + "github.com/chrislusf/seaweedfs/weed/filer" "github.com/chrislusf/seaweedfs/weed/glog" "github.com/chrislusf/seaweedfs/weed/pb" @@ -10,9 +14,6 @@ import ( xhttp "github.com/chrislusf/seaweedfs/weed/s3api/http" "github.com/chrislusf/seaweedfs/weed/s3api/s3_constants" "github.com/chrislusf/seaweedfs/weed/s3api/s3err" - "io/ioutil" - "net/http" - "strings" ) type Action string @@ -91,7 +92,7 @@ func (iam *IdentityAccessManagement) loadS3ApiConfigurationFromFiler(option *S3A } func (iam *IdentityAccessManagement) loadS3ApiConfigurationFromFile(fileName string) error { - content, readErr := ioutil.ReadFile(fileName) + content, readErr := os.ReadFile(fileName) if readErr != nil { glog.Warningf("fail to read %s : %v", fileName, readErr) return fmt.Errorf("fail to read %s : %v", fileName, readErr) |
