Skip to content

Commit

Permalink
replace ioutil.ReadFile with os.ReadFile
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwilder committed Mar 18, 2024
1 parent 8c38d3a commit 8c7c168
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions aws_helper/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package aws_helper

import (
"fmt"
"io/ioutil"
"os"
"time"

Expand Down Expand Up @@ -123,7 +122,7 @@ func (f tokenFetcher) FetchToken(ctx credentials.Context) ([]byte, error) {
if _, err := os.Stat(string(f)); err != nil {
return []byte(f), nil
}
token, err := ioutil.ReadFile(string(f))
token, err := os.ReadFile(string(f))
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -238,7 +237,7 @@ func AssumeIamRole(iamRoleOpts options.IAMRoleOptions) (*sts.Credentials, error)
if _, err := os.Stat(iamRoleOpts.WebIdentityToken); err != nil {
token = iamRoleOpts.WebIdentityToken
} else {
tb, err := ioutil.ReadFile(iamRoleOpts.WebIdentityToken)
tb, err := os.ReadFile(iamRoleOpts.WebIdentityToken)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 8c7c168

Please sign in to comment.