13 lines
291 B
Go
13 lines
291 B
Go
package ezhandler
|
|
|
|
import "net/http"
|
|
|
|
type Handler interface {
|
|
ServeHTTP(w http.ResponseWriter, r *http.Request) error
|
|
}
|
|
|
|
type HandlerFunc func(w http.ResponseWriter, r *http.Request) error
|
|
|
|
func (fn HandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request) error {
|
|
return fn(w, r)
|
|
}
|