router.go 228 B

1234567891011121314151617
  1. package admin
  2. import (
  3. "net/http"
  4. )
  5. func SetupRouter(c Config) (mux *http.ServeMux) {
  6. r := http.NewServeMux()
  7. r.Handle("/", c.pb)
  8. c.lb.Mount(r)
  9. mux = http.NewServeMux()
  10. mux.Handle("/", c.lb.Middleware()(r))
  11. return
  12. }