handler.go 237 B

1234567891011121314151617
  1. package apiserv
  2. import "net/http"
  3. type Handler struct {
  4. handler http.Handler
  5. methods []string
  6. }
  7. func (s Handler) IsMethod(method string) bool {
  8. for _, v := range s.methods {
  9. if v == method {
  10. return true
  11. }
  12. }
  13. return false
  14. }