mirror of
https://github.com/beego/bee.git
synced 2024-12-24 03:00:49 +00:00
Fix staticcheck failed - cutset contains duplicate characters (SA1024)
This commit is contained in:
parent
f2696160ae
commit
22af6cc712
@ -541,7 +541,7 @@ func parserComments(f *ast.FuncDecl, controllerName, pkgpath string) error {
|
||||
//TODO: resultMap := buildParamMap(f.Type.Results)
|
||||
if comments != nil && comments.List != nil {
|
||||
for _, c := range comments.List {
|
||||
t := strings.TrimSpace(strings.TrimLeft(c.Text, "//"))
|
||||
t := strings.TrimSpace(strings.TrimPrefix(c.Text, "//"))
|
||||
if strings.HasPrefix(t, "@router") {
|
||||
elements := strings.TrimSpace(t[len("@router"):])
|
||||
e1 := strings.SplitN(elements, " ", 2)
|
||||
|
Loading…
Reference in New Issue
Block a user