优化httpserver

This commit is contained in:
boyce
2019-01-28 11:31:17 +08:00
parent 5bac2dc314
commit 0b97b5f68a
4 changed files with 42 additions and 18 deletions

View File

@@ -293,7 +293,7 @@ func suitableMethods(prefix string, typ reflect.Type, reportErr bool) map[string
mname := method.Name
if prefix != "" {
if len(mname) < 4 || mname[:4] != prefix {
if strings.Contains(mname, prefix) == false {
continue
}
}