Skip to content

Commit

Permalink
Use -s with gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mtibben committed Feb 18, 2020
1 parent 0864352 commit 12866e7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
run: go vet ./...

- name: Check go fmt
run: diff -u <(echo -n) <(gofmt -d $(git ls-files '*.go'))
run: diff -u <(echo -n) <(gofmt -s -d .)
26 changes: 13 additions & 13 deletions vault/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ func TestProfilesFromConfig(t *testing.T) {
}

expected := []vault.ProfileSection{
vault.ProfileSection{Name: "default", Region: "us-west-2"},
vault.ProfileSection{Name: "user2", Region: "us-east-1"},
vault.ProfileSection{Name: "withsource", Region: "us-east-1", SourceProfile: "user2"},
vault.ProfileSection{Name: "withmfa", MfaSerial: "arn:aws:iam::1234513441:mfa/blah", RoleARN: "arn:aws:iam::4451234513441615400570:role/aws_admin", Region: "us-east-1", DurationSeconds: 1200, SourceProfile: "user2"},
vault.ProfileSection{Name: "testparentprofile1", Region: "us-east-1"},
vault.ProfileSection{Name: "testparentprofile2", ParentProfile: "testparentprofile1"},
{Name: "default", Region: "us-west-2"},
{Name: "user2", Region: "us-east-1"},
{Name: "withsource", Region: "us-east-1", SourceProfile: "user2"},
{Name: "withmfa", MfaSerial: "arn:aws:iam::1234513441:mfa/blah", RoleARN: "arn:aws:iam::4451234513441615400570:role/aws_admin", Region: "us-east-1", DurationSeconds: 1200, SourceProfile: "user2"},
{Name: "testparentprofile1", Region: "us-east-1"},
{Name: "testparentprofile2", ParentProfile: "testparentprofile1"},
}
actual := cfg.ProfileSections()

Expand Down Expand Up @@ -193,13 +193,13 @@ func TestAddProfileToExistingConfig(t *testing.T) {
}

expected := []vault.ProfileSection{
vault.ProfileSection{Name: "default", Region: "us-west-2"},
vault.ProfileSection{Name: "user2", Region: "us-east-1"},
vault.ProfileSection{Name: "withsource", Region: "us-east-1", SourceProfile: "user2"},
vault.ProfileSection{Name: "withmfa", MfaSerial: "arn:aws:iam::1234513441:mfa/blah", RoleARN: "arn:aws:iam::4451234513441615400570:role/aws_admin", Region: "us-east-1", DurationSeconds: 1200, SourceProfile: "user2"},
vault.ProfileSection{Name: "testparentprofile1", Region: "us-east-1"},
vault.ProfileSection{Name: "testparentprofile2", ParentProfile: "testparentprofile1"},
vault.ProfileSection{Name: "llamas", MfaSerial: "testserial", Region: "us-east-1", SourceProfile: "default"},
{Name: "default", Region: "us-west-2"},
{Name: "user2", Region: "us-east-1"},
{Name: "withsource", Region: "us-east-1", SourceProfile: "user2"},
{Name: "withmfa", MfaSerial: "arn:aws:iam::1234513441:mfa/blah", RoleARN: "arn:aws:iam::4451234513441615400570:role/aws_admin", Region: "us-east-1", DurationSeconds: 1200, SourceProfile: "user2"},
{Name: "testparentprofile1", Region: "us-east-1"},
{Name: "testparentprofile2", ParentProfile: "testparentprofile1"},
{Name: "llamas", MfaSerial: "testserial", Region: "us-east-1", SourceProfile: "default"},
}
actual := cfg.ProfileSections()

Expand Down

0 comments on commit 12866e7

Please sign in to comment.