}
}
-func (t *Web) Shutdown() {
- t.Server.Shutdown(context.Background())
+func (t *Web) Shutdown(ctx ...context.Context) {
+ ctx = append(ctx, context.Background())
+ t.Server.Shutdown(ctx[0])
}
type WebSync struct {
if ok {
f(w, r)
} else {
- w.WriteHeader(http.StatusNotFound)
+ WithStatusCode(w, http.StatusNotFound)
}
})
return
}
-func (t *WebSync) Shutdown() {
- t.Server.Shutdown(context.Background())
+func (t *WebSync) Shutdown(ctx ...context.Context) {
+ ctx = append(ctx, context.Background())
+ t.Server.Shutdown(ctx[0])
}
type WebPath struct {