package admin import ( "log" "net/http" ) // Admin middleware to handle requests to the admin repo. func AdminHooks(adminSvc *Servicer, next http.Handler) http.Handler { return http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) { log.Printf("stuffs about to reload %s", "now") next.ServeHTTP(rw, req) go adminSvc.Reload() }) }