ss/handler.go
2023-12-07 12:52:02 +03:00

25 lines
387 B
Go

package bond
import (
"net/http"
)
type Request = http.Request
type ResponseWriter = http.ResponseWriter
type HandlerFunc = http.HandlerFunc
type Handler = http.Handler
type Server = http.Server
type Context struct {
R *Request
W ResponseWriter
}
type ContextFunc func(*Context)
func (fn ContextFunc) ServeHTTP(w ResponseWriter, r *Request) {
fn(&Context{
R: r,
W: w,
})
}