apply go fmt on config.go

This commit is contained in:
Sargurunathan Mohan 2015-08-16 17:13:23 -07:00
parent b95e7a976c
commit 9abd74819e
1 changed files with 11 additions and 11 deletions

View File

@ -214,17 +214,17 @@ func (c *Config) ValidateAccountId(iamconn *iam.IAM) error {
out, err := iamconn.GetUser(nil) out, err := iamconn.GetUser(nil)
if err != nil { if err != nil {
awsErr, _ := err.(awserr.Error) awsErr, _ := err.(awserr.Error)
if awsErr.Code() == "ValidationError" { if awsErr.Code() == "ValidationError" {
log.Printf("[WARN] ValidationError with iam.GetUser, assuming its an IAM profile") log.Printf("[WARN] ValidationError with iam.GetUser, assuming its an IAM profile")
// User may be an IAM instance profile, so fail silently. // User may be an IAM instance profile, so fail silently.
// If it is an IAM instance profile // If it is an IAM instance profile
// validating account might be superfluous // validating account might be superfluous
} else { } else {
return fmt.Errorf("Failed getting account ID from IAM: %s", err) return fmt.Errorf("Failed getting account ID from IAM: %s", err)
// return error if the account id is explicitly not authorised // return error if the account id is explicitly not authorised
} }
} }
account_id := strings.Split(*out.User.ARN, ":")[4] account_id := strings.Split(*out.User.ARN, ":")[4]