Update codegen for cleanup/less verbosity

This commit is contained in:
Tit Petric
2019-05-22 16:37:53 +02:00
parent 0611e4b9c3
commit 4c166d92c6
60 changed files with 779 additions and 1832 deletions
+17
View File
@@ -0,0 +1,17 @@
package handlers
import (
"net/http"
)
// Edit this file in `codegen/common/rest/handlers/util.go`;
// any changes under [service] will be overwritten by codegen.
func serveHTTP(value interface{}, w http.ResponseWriter, r *http.Request) bool {
switch fn := value.(type) {
case func(http.ResponseWriter, *http.Request):
fn(w, r)
return true
}
return false
}