Skip to content

Commit c410bd2

Browse files
authored
Merge pull request #35806 from BenTheElder/non-const-fmt
fix non-constant format string errors
2 parents d028e6a + 1d61e60 commit c410bd2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

gcsweb/cmd/gcsweb/gcsweb_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ func TestGetParent(t *testing.T) {
648648
t.Run(tc.id, func(t *testing.T) {
649649
actual := getParent(tc.path)
650650
if !reflect.DeepEqual(tc.expected, actual) {
651-
t.Fatalf(cmp.Diff(tc.expected, actual))
651+
t.Fatal(cmp.Diff(tc.expected, actual))
652652
}
653653
})
654654
}

kubetest/aksengine.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,16 +1189,16 @@ func (c *aksEngineDeployer) DumpClusterLogs(localPath, gcsPath string) error {
11891189
return nil
11901190
}
11911191

1192-
var errors []string
1192+
var errs []string
11931193
if err := logDumper(); err != nil {
1194-
errors = append(errors, err.Error())
1194+
errs = append(errs, err.Error())
11951195
}
11961196
if err := logDumperWindows(); err != nil {
11971197
// don't log error since logDumperWindows failed is expected on non-Windows cluster
11981198
_ = err
11991199
}
1200-
if len(errors) != 0 {
1201-
return fmt.Errorf(strings.Join(errors, "\n"))
1200+
if len(errs) != 0 {
1201+
return errors.New(strings.Join(errs, "\n"))
12021202
}
12031203
return nil
12041204
}

0 commit comments

Comments
 (0)