github.com/HXSecurity/DongTai-agent-go@v0.4.2/core/http/httpRequestCookie/replacement.go (about) 1 package httpRequestCookie 2 3 import ( 4 "github.com/HXSecurity/DongTai-agent-go/model/request" 5 "net/http" 6 ) 7 8 func Cookie(req *http.Request, name string) (*http.Cookie, error) { 9 cookie, err := CookieT(req, name) 10 request.FmtHookPool(request.PoolReq{ 11 Args: request.Collect(name), 12 Reqs: request.Collect(cookie, err), 13 Source: true, 14 OriginClassName: "http.(*Request)", 15 MethodName: "Cookie", 16 ClassName: "http.(*Request)", 17 }) 18 return cookie, err 19 } 20 21 func CookieT(req *http.Request, name string) (c *http.Cookie, e error) { 22 return c, e 23 }