You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like Context is importing the http.ResponseWriter interface as an anonymous field (https://github.com/hoisie/web/blob/master/web.go#L33), which is an error in Go - this inserts dummy functions into the structure that if called can cause an error. A more proper way to indicate that Context conforms to the interface would be:
type Context struct {
Request *http.Request
Params map[string]string
Server *Server
}
var _ http.ResponseWriter = (*Context)(nil)
However, there are some functions missing from Context that will cause some more errors:
\hoisie\web\web.go:35: cannot use (*Context)(nil) (type *Context) as type http.ResponseWriter in assignment:
*Context does not implement http.ResponseWriter (missing Header method)
The text was updated successfully, but these errors were encountered:
It looks like Context is importing the http.ResponseWriter interface as an anonymous field (https://github.com/hoisie/web/blob/master/web.go#L33), which is an error in Go - this inserts dummy functions into the structure that if called can cause an error. A more proper way to indicate that Context conforms to the interface would be:
type Context struct {
Request *http.Request
Params map[string]string
Server *Server
}
var _ http.ResponseWriter = (*Context)(nil)
However, there are some functions missing from Context that will cause some more errors:
\hoisie\web\web.go:35: cannot use (*Context)(nil) (type *Context) as type http.ResponseWriter in assignment:
*Context does not implement http.ResponseWriter (missing Header method)
The text was updated successfully, but these errors were encountered: