Skip to content

Commit 4a3ccc1

Browse files
committed
fix noctx linter
Signed-off-by: Tim Ramlot <[email protected]>
1 parent 8bef807 commit 4a3ccc1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.golangci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ linters:
1414
- govet
1515
- musttag
1616
- nilerr
17-
- noctx
1817
- unparam
1918
text: .*
2019
paths: [third_party$, builtin$, examples$]

pkg/echo/echo_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package echo
22

33
import (
44
"bytes"
5+
"context"
56
"encoding/json"
67
"net/http"
78
"net/http/httptest"
@@ -60,7 +61,7 @@ func TestEchoServerRequestResponse(t *testing.T) {
6061
}
6162

6263
// generate a request to test the handler containing the JSON data as a body
63-
req, err := http.NewRequest(sampleUpload.method, "http://example.com/api/v1/datareadings", bytes.NewBuffer(requestBodyJSON))
64+
req, err := http.NewRequestWithContext(context.TODO(), sampleUpload.method, "http://example.com/api/v1/datareadings", bytes.NewBuffer(requestBodyJSON))
6465
if err != nil {
6566
t.Fatalf("[%s]\nfailed to generate request to test echo server: %s", sampleUpload.description, err)
6667
}

0 commit comments

Comments
 (0)