diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2021-10-13 22:38:58 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-13 22:38:58 -0700 |
| commit | 5fd4b05c5ef2de1d49bfa35d42d4ac4f3bc9b068 (patch) | |
| tree | bb21b4450e8611eed89d33dfdd46e4e6144bc00b /weed/s3api/auth_credentials.go | |
| parent | 46a09c60744eff104fdfc1a1fade38c5485f0dda (diff) | |
| parent | a23bcbb7ecf93fcda35976f4f2fb42a67830e718 (diff) | |
| download | seaweedfs-5fd4b05c5ef2de1d49bfa35d42d4ac4f3bc9b068.tar.xz seaweedfs-5fd4b05c5ef2de1d49bfa35d42d4ac4f3bc9b068.zip | |
Merge pull request #2381 from Juneezee/deprecate-ioutil
refactor: move from io/ioutil to io and os package
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) |
