Skip to content

Commit

Permalink
Remove needless parentheses
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 committed Dec 1, 2023
1 parent 56c1645 commit 5d99289
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions client_opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ func (o *ClientOpts) LoadOptions() []func(options *config.LoadOptions) error {
loadOpts = append(loadOpts,
config.WithAssumeRoleCredentialOptions(func(options *stscreds.AssumeRoleOptions) {
options.RoleARN = o.AssumeRoleARN
if (o.AssumeRoleSessionName != "") {
if o.AssumeRoleSessionName != "" {
options.RoleSessionName = o.AssumeRoleSessionName
}
if (o.AssumeRoleExternalID != "") {
if o.AssumeRoleExternalID != "" {
options.ExternalID = aws.String(o.AssumeRoleExternalID)
}
if (o.AssumeRoleDuration != nil) {
if o.AssumeRoleDuration != nil {
options.Duration = *o.AssumeRoleDuration
}
}),
Expand Down Expand Up @@ -119,13 +119,13 @@ func WithStaticCredentials(a, s string) ClientOptsFunc {
func WithAssumeRoleCredentialOptions(a, s, id string, t *time.Duration) ClientOptsFunc {
return func(opts *ClientOpts) error {
opts.AssumeRoleARN = a
if (s != "") {
if s != "" {
opts.AssumeRoleSessionName = s
}
if (id != "") {
if id != "" {
opts.AssumeRoleExternalID = id
}
if (t != nil) {
if t != nil {
opts.AssumeRoleDuration = t
}
return nil
Expand Down

0 comments on commit 5d99289

Please sign in to comment.