fix golint warnings

This commit is contained in:
kevin
2020-08-19 16:00:55 +08:00
parent 2ebb5b6b58
commit 9e14820698
14 changed files with 44 additions and 36 deletions

View File

@@ -148,7 +148,6 @@ func createGoModFileIfNeed(dir string) {
}
tempPath = filepath.Dir(tempPath)
if util.FileExists(filepath.Join(tempPath, goModeIdentifier)) {
tempPath = filepath.Dir(tempPath)
hasGoMod = true
break
}

View File

@@ -72,7 +72,7 @@ func genHandler(dir string, group spec.Group, route spec.Route) error {
req = ""
}
var logicResponse string
var writeResponse = "nil, nil"
var writeResponse string
var respWriter = `httpx.WriteJson(w, http.StatusOK, resp)`
if len(route.ResponseType.Name) > 0 {
logicResponse = "resp, err :="