Why can I pass a struct pointer into a function parameter that is not a struct pointer in Go? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed yesterday. Improve this question Take the following struct: type CustomResponseWriter struct { http.ResponseWriter StatusCode int } func (w *CustomResponseWriter) WriteHeader(statusCode int) { w.ResponseWriter.WriteHeader(statusCode) w.StatusCode = statusCode … Read more