mirror of
https://github.com/thegeeklab/wp-docker-buildx.git
synced 2024-11-10 03:30:40 +00:00
Apply suggestions from code review
Co-Authored-By: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
b5b34938c5
commit
2184682042
@ -44,7 +44,6 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sess, err := session.NewSession(&aws.Config{Region: ®ion})
|
sess, err := session.NewSession(&aws.Config{Region: ®ion})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(fmt.Sprintf("error creating aws session: %v", err))
|
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 == "" {
|
if role == "" {
|
||||||
return ecr.New(sess)
|
return ecr.New(sess)
|
||||||
}
|
}
|
||||||
creds := stscreds.NewCredentials(sess, role)
|
return ecr.New(sess, &aws.Config{
|
||||||
return ecr.New(sess, &aws.Config{Credentials: creds})
|
Credentials: stscreds.NewCredentials(sess, role),
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user