Skip to content

Commit

Permalink
remove else statement
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiyan-sheng committed May 3, 2021
1 parent 5ff9330 commit f148d38
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions x-pack/libbeat/common/aws/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ func getAccessKeys(config ConfigAWS) awssdk.Config {
if config.RoleArn != "" {
logger.Debug("Using role arn and access keys for AWS credential")
return getRoleArn(config, awsConfig)
} else {
logger.Debug("Using access keys for AWS credential")
return awsConfig
}

logger.Debug("Using access keys for AWS credential")
return awsConfig
}

func getSharedCredentialProfile(config ConfigAWS) (awssdk.Config, error) {
Expand Down Expand Up @@ -101,10 +101,10 @@ func getSharedCredentialProfile(config ConfigAWS) (awssdk.Config, error) {
if config.RoleArn != "" {
logger.Debug("Using role arn and shared credential profile for AWS credential")
return getRoleArn(config, awsConfig), nil
} else {
logger.Debug("Using shared credential profile for AWS credential")
return awsConfig, nil
}

logger.Debug("Using shared credential profile for AWS credential")
return awsConfig, nil
}

func getRoleArn(config ConfigAWS, awsConfig awssdk.Config) awssdk.Config {
Expand Down

0 comments on commit f148d38

Please sign in to comment.