fix: panic on unknown verb

This commit is contained in:
Daniel G. Taylor 2020-09-25 10:51:26 -07:00
parent 707c610d6f
commit ea204ab9e3
No known key found for this signature in database
GPG key ID: 7BD6DC99C9A87E22

View file

@ -159,6 +159,8 @@ func (o *Operation) Run(handler interface{}) {
register = o.resource.mux.Patch
case http.MethodDelete:
register = o.resource.mux.Delete
default:
panic(fmt.Errorf("Unknown HTTP verb: %s", o.method))
}
t := reflect.TypeOf(handler)