make guard clauses to clearly see success pass
This commit is contained in:
parent
0864b4d07b
commit
54af9951a8
|
@ -84,9 +84,10 @@ func (c *AccessConfig) Session() (*session.Session, error) {
|
|||
}
|
||||
}
|
||||
|
||||
if sess, err := session.NewSessionWithOptions(opts); err != nil {
|
||||
sess, err := session.NewSessionWithOptions(opts)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
} else {
|
||||
}
|
||||
log.Printf("Found region %s", *sess.Config.Region)
|
||||
c.session = sess
|
||||
|
||||
|
@ -101,7 +102,6 @@ func (c *AccessConfig) Session() (*session.Session, error) {
|
|||
}
|
||||
}
|
||||
log.Printf("[INFO] AWS Auth provider used: %q", cp.ProviderName)
|
||||
}
|
||||
|
||||
if c.DecodeAuthZMessages {
|
||||
DecodeAuthZMessages(c.session)
|
||||
|
|
Loading…
Reference in New Issue