-
Notifications
You must be signed in to change notification settings - Fork 706
Open
Description
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)
Metadata
Metadata
Assignees
Labels
No labels