🚧 Scaffold basic functionality
This commit is contained in:
parent
f511b9f240
commit
aa7dfb532f
7 changed files with 192 additions and 0 deletions
13
handler.go
Normal file
13
handler.go
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue