Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 02c2636

Browse files
committed
lint: Remove non-constant format string in calls
I'm not sure why this was disabled, but undisable it. Signed-off-by: Stephen Finucane <[email protected]>
1 parent 22b0ac1 commit 02c2636

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

.golangci.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ linters:
1818
- linters:
1919
- staticcheck
2020
text: "SA1019: (x509.EncryptPEMBlock|strings.Title)"
21-
- path: (.+)\.go$
22-
text: SA1006
2321
paths:
2422
- third_party$
2523
- builtin$

openstack/networking/v2/extensions/security/addressgroups/testing/requests_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func TestList(t *testing.T) {
2323
w.Header().Add("Content-Type", "application/json")
2424
w.WriteHeader(http.StatusOK)
2525

26-
fmt.Fprintf(w, AddressGroupListResponse)
26+
fmt.Fprint(w, AddressGroupListResponse)
2727
})
2828

2929
count := 0
@@ -73,7 +73,7 @@ func TestCreate(t *testing.T) {
7373
w.Header().Add("Content-Type", "application/json")
7474
w.WriteHeader(http.StatusCreated)
7575

76-
fmt.Fprintf(w, AddressGroupCreateResponse)
76+
fmt.Fprint(w, AddressGroupCreateResponse)
7777
})
7878

7979
opts := addressgroups.CreateOpts{
@@ -107,7 +107,7 @@ func TestGet(t *testing.T) {
107107
w.Header().Add("Content-Type", "application/json")
108108
w.WriteHeader(http.StatusOK)
109109

110-
fmt.Fprintf(w, AddressGroupGetResponse)
110+
fmt.Fprint(w, AddressGroupGetResponse)
111111
})
112112

113113
sr, err := addressgroups.Get(context.TODO(), fake.ServiceClient(fakeServer), "8722e0e0-9cc9-4490-9660-8c9a5732fbb0").Extract()
@@ -134,7 +134,7 @@ func TestUpdate(t *testing.T) {
134134
w.Header().Add("Content-Type", "application/json")
135135
w.WriteHeader(http.StatusOK)
136136

137-
fmt.Fprintf(w, AddressGroupUpdateResponse)
137+
fmt.Fprint(w, AddressGroupUpdateResponse)
138138
})
139139

140140
name := "ADDR_GP_2"
@@ -168,7 +168,7 @@ func TestAddAddresses(t *testing.T) {
168168
w.Header().Add("Content-Type", "application/json")
169169
w.WriteHeader(http.StatusOK)
170170

171-
fmt.Fprintf(w, AddressGroupAddAddressesResponse)
171+
fmt.Fprint(w, AddressGroupAddAddressesResponse)
172172
})
173173

174174
opts := addressgroups.UpdateAddressesOpts{
@@ -197,7 +197,7 @@ func TestRemoveAddresses(t *testing.T) {
197197
w.Header().Add("Content-Type", "application/json")
198198
w.WriteHeader(http.StatusOK)
199199

200-
fmt.Fprintf(w, AddressGroupRemoveAddressesResponse)
200+
fmt.Fprint(w, AddressGroupRemoveAddressesResponse)
201201
})
202202

203203
opts := addressgroups.UpdateAddressesOpts{

0 commit comments

Comments
 (0)