Skip to content

Commit 988b546

Browse files
committed
chore: fix more non-constant format string errors
1 parent 6aef43c commit 988b546

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

server/kapacitors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ func (s *Service) deactivateOtherKapacitors(ctx context.Context, srcID int, ID i
350350
}
351351
}
352352
if len(deactivationErrors) > 1 {
353-
return fmt.Errorf(strings.Join(deactivationErrors, "\n"))
353+
return fmt.Errorf("%s", strings.Join(deactivationErrors, "\n"))
354354
}
355355
return deactivationError
356356
}

server/mountable_router_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func Test_MountableRouter_MountsRoutesUnderPrefix(t *testing.T) {
2424

2525
expected := "Hello?! McFly?! Anybody in there?!"
2626
mr.GET("/biff", http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
27-
fmt.Fprintf(rw, expected)
27+
fmt.Fprintf(rw, "%s", expected)
2828
}))
2929

3030
ts := httptest.NewServer(mr)

server/url_prefixer_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ func Test_Server_Prefixer_NoPrefixingWithoutFlusther(t *testing.T) {
180180
func Test_Server_Prefixer_IgnoreJsAndSvg(t *testing.T) {
181181
expected := "Keep it the same please"
182182
backend := http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
183-
fmt.Fprintf(rw, expected)
183+
fmt.Fprintf(rw, "%s", expected)
184184
})
185185

186186
tl := &mocks.TestLogger{}

0 commit comments

Comments
 (0)