fix go vet issue

This commit is contained in:
Matthew Hooker 2017-03-01 12:00:20 -08:00
parent d7e39b72b2
commit 94854a26d9
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ func (c *AccessConfig) Prepare(ctx *interpolate.Context) []error {
hasAssumeRoleArn := len(c.AssumeRoleArn) > 0
hasMFASerial := len(c.MFASerial) > 0
hasMFACode := len(c.MFACode) > 0
if hasAssumeRoleArn && ((hasMFACode && !hasMFASerial) || (!hasMFACode && !hasMFACode)) {
if hasAssumeRoleArn && (!hasMFACode || !hasMFASerial) {
errs = append(errs, fmt.Errorf("Both mfa_serial and mfa_code must be specified."))
}