From bce0382f6c220dc0f85edc1e6c02bd25170a155f Mon Sep 17 00:00:00 2001 From: Eno Compton Date: Tue, 22 Jun 2021 12:44:14 -0600 Subject: [PATCH] google: fix syntax error Change-Id: I18dd98234a87dca59a199d90a5d0b9cedd80e5af Reviewed-on: https://go-review.googlesource.com/c/oauth2/+/330189 Reviewed-by: Cody Oss Trust: Cody Oss Trust: Tyler Bui-Palsulich Run-TryBot: Cody Oss TryBot-Result: Go Bot --- google/internal/externalaccount/aws.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/google/internal/externalaccount/aws.go b/google/internal/externalaccount/aws.go index cb41c62..a5a5423 100644 --- a/google/internal/externalaccount/aws.go +++ b/google/internal/externalaccount/aws.go @@ -13,7 +13,6 @@ import ( "encoding/json" "errors" "fmt" - "golang.org/x/oauth2" "io" "io/ioutil" "net/http" @@ -23,6 +22,8 @@ import ( "sort" "strings" "time" + + "golang.org/x/oauth2" ) type awsSecurityCredentials struct { @@ -342,7 +343,8 @@ func (cs awsCredentialSource) subjectToken() (string, error) { func (cs *awsCredentialSource) getRegion() (string, error) { if envAwsRegion := getenv("AWS_REGION"); envAwsRegion != "" { return envAwsRegion, nil - } if envAwsRegion := getenv("AWS_DEFAULT_REGION"); envAwsRegion != "" { + } + if envAwsRegion := getenv("AWS_DEFAULT_REGION"); envAwsRegion != "" { return envAwsRegion, nil }