-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Labels
Description
gomod go get installed, version gocloc \ @ v0.3.1
Comprehensive code is regarded as a comment after return "/*" in go code
gomod go get安装,版本gocloc@v0.3.1
在go代码中return "/*" 后全面代码算为注释
// getRouteByName 函数使用函数名称生成路由路径。
func getRouteByName(name string) string {
names := splitName(name)
if checkAllowMethod(names[0]) {
names = names[1:]
}
if len(names) == 0 {
return "/*"
}
name = ""
for i := 0; i < len(names); i++ {
if names[i] == "By" {
name = name + "/:" + names[i+1]
i++
} else {
name = name + "/" + names[i]
}
}
return strings.ToLower(name)
}Reactions are currently unavailable