File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ func (a *Analyzer) usedReqByCall(call *ssa.Call) []*ssa.Extract {
97
97
exts := make ([]* ssa.Extract , 0 , len (args ))
98
98
99
99
// skip net/http.Request method call
100
- if call .Common ().Signature ().Recv () != nil && types .Identical (call . Value () .Type (), a .requestType ) {
100
+ if recv := call .Common ().Signature ().Recv (); recv != nil && types .Identical (recv .Type (), a .requestType ) {
101
101
return exts
102
102
}
103
103
Original file line number Diff line number Diff line change @@ -129,4 +129,9 @@ func main() {
129
129
130
130
return req14 , req15
131
131
}()
132
+
133
+ req121 , _ := http .NewRequest (http .MethodPost , url , nil ) // OK
134
+ req121 .AddCookie (& http.Cookie {Name : "k" , Value : "v" })
135
+ req121 = req121 .WithContext (context .WithValue (req .Context (), struct {}{}, 0 ))
136
+ cli .Do (req121 )
132
137
}
You can’t perform that action at this time.
0 commit comments