I have the following struct which contains a net/http.Request:
type MyRequest struct { http.Request PathParams map[string]string } Now I want to initialize the anonymous inner struct http.Request in the following function:
func New(origRequest *http.Request, pathParams map[string]string) *MyRequest { req := new(MyRequest) req.PathParams = pathParams return req } How can I initialize the inner struct with the parameter origRequest?