18 lines
352 B
Go
18 lines
352 B
Go
|
package web
|
||
|
|
||
|
import "net/http"
|
||
|
|
||
|
func WithAuth(f http.HandlerFunc) http.HandlerFunc {
|
||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||
|
// TODO check request auth
|
||
|
f(w, r)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func WithCompression(f http.HandlerFunc) http.HandlerFunc {
|
||
|
return func(w http.ResponseWriter, r *http.Request) {
|
||
|
// TODO wrap writter in compressor
|
||
|
f(w, r)
|
||
|
}
|
||
|
}
|