0
0
mirror of https://github.com/thegeeklab/wp-docker-buildx.git synced 2024-11-25 19:20:39 +00:00

Apply suggestions from code review

Co-Authored-By: Lauris BH <lauris@nix.lv>
This commit is contained in:
Joe Walton 2019-10-14 10:20:32 +01:00 committed by GitHub
parent b5b34938c5
commit 2184682042
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,7 +44,6 @@ func main() {
}
sess, err := session.NewSession(&aws.Config{Region: &region})
if err != nil {
log.Fatal(fmt.Sprintf("error creating aws session: %v", err))
}
@ -185,6 +184,7 @@ func getECRClient(sess *session.Session, role string) *ecr.ECR {
if role == "" {
return ecr.New(sess)
}
creds := stscreds.NewCredentials(sess, role)
return ecr.New(sess, &aws.Config{Credentials: creds})
return ecr.New(sess, &aws.Config{
Credentials: stscreds.NewCredentials(sess, role),
})
}