I have the following struct which contains a net/http.Request:
struct
net/http.Request
type MyRequest struct { http.Request PathParams map[string]strin
What about:
func New(origRequest *http.Request, pathParams map[string]string) *MyRequest { return &MyRequest{*origRequest, pathParams} }
It shows that instead of
New(foo, bar)
you might prefer just
&MyRequest{*foo, bar}
directly.