Skip to content

Commit 997f7f7

Browse files
committed
fix test
1 parent 2f300bb commit 997f7f7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

testdata/src/a/a.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,10 @@ func f9(w http.ResponseWriter, r *http.Request) {
104104
f8(context.Background(), w, r) // want "Non-inherited new context, use function like `context.WithXXX` or `r.Context` instead"
105105
}
106106

107+
// auto mark r as server-side request
107108
func f10(in bool, w http.ResponseWriter, r *http.Request) {
108109
f8(r.Context(), w, r)
109-
f8(context.Background(), w, r)
110+
f8(context.Background(), w, r) // want "Non-inherited new context, use function like `context.WithXXX` or `r.Context` instead"
110111
}
111112

112113
// nolint: contextcheck
@@ -126,8 +127,7 @@ func f11() {
126127

127128
f9(w, r)
128129

129-
// f10 should be like `func f10(ctx context.Context, in bool, w http.ResponseWriter, r *http.Request)`
130-
f10(true, w, r) // want "Function `f10` should pass the context parameter"
130+
f10(true, w, r)
131131

132132
f14(w, r, nil)
133133
f15(w, r, nil)

0 commit comments

Comments
 (0)