etcdserver/api/v2http/http.go
func allowMethod(w http.ResponseWriter, m string, ms ...string) bool {
	for _, meth := range ms {
		if m == meth {
			return true
		}
	}
	w.Header().Set("Allow", strings.Join(ms, ","))
	http.Error(w, "Method Not Allowed", http.StatusMethodNotAllowed)
	return false
}
func allowMethod(w http.ResponseWriter, m string, ms ...string) bool {
	for _, meth := range ms {
		if m == meth {
			return true
		}
	}
	w.Header().Set("Allow", strings.Join(ms, ","))
	http.Error(w, "Method Not Allowed", http.StatusMethodNotAllowed)
	return false
}
func allowMethod ( w http . ResponseWriter , m string , ms ... string ) bool { for _ , meth := range ms { if m == meth { return true } } w . Header ( ) . Set ( " " , strings . Join ( ms , " " ) ) http . Error ( w , " " , http . StatusMethodNotAllowed ) return false }
// allowMethod verifies that the given method is one of the allowed methods,
// and if not, it writes an error to w.  A boolean is returned indicating
// whether or not the method is allowed.
allowMethod verifies that the given method is one of the allowed methods and if not it writes an error to w . A boolean is returned indicating whether or not the method is allowed .