fix httpNoBody from go-critic

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2025-05-26 22:30:15 +02:00
parent 8f7faa01d1
commit 469afa5f8f
20 changed files with 51 additions and 52 deletions

View File

@@ -46,7 +46,7 @@ func TestPeerCertificateMarshalJSON(t *testing.T) {
certs := []*x509.Certificate{cert}
addr := "www.authz.com/auth"
req, err := http.NewRequest(http.MethodGet, addr, nil)
req, err := http.NewRequest(http.MethodGet, addr, http.NoBody)
assert.NilError(t, err)
req.RequestURI = addr

View File

@@ -33,7 +33,7 @@ func TestMiddlewareWrapHandler(t *testing.T) {
assert.Assert(t, mdHandler != nil)
addr := "www.example.com/auth"
req, _ := http.NewRequest(http.MethodGet, addr, nil)
req, _ := http.NewRequest(http.MethodGet, addr, http.NoBody)
req.RequestURI = addr
req.Header.Add("header", "value")