netcaptain/internal/web/helpers.go

13 lines
294 B
Go

package web
import "net/http"
func IsHttpMethod(val string) bool {
switch val {
case http.MethodGet, http.MethodHead, http.MethodPost, http.MethodPut, http.MethodPatch, http.MethodDelete, http.MethodConnect, http.MethodOptions, http.MethodTrace:
return true
default:
return false
}
}