mirror of
https://github.com/astaxie/beego.git
synced 2025-07-16 02:22:15 +00:00
small fixes
This commit is contained in:
@@ -199,12 +199,11 @@ func parseComment(lines []*ast.Comment) (pc *parsedComment, err error) {
|
||||
logs.Error("Invalid @Param format. Needs at least 4 parameters")
|
||||
}
|
||||
p := parsedParam{}
|
||||
names := strings.Split(pv[0], "=")
|
||||
funcParamName := names[0]
|
||||
names := strings.SplitN(pv[0], "=>", 2)
|
||||
p.name = names[0]
|
||||
funcParamName := p.name
|
||||
if len(names) > 1 {
|
||||
p.name = names[1]
|
||||
} else {
|
||||
p.name = funcParamName
|
||||
funcParamName = names[1]
|
||||
}
|
||||
p.location = pv[1]
|
||||
p.datatype = pv[2]
|
||||
|
Reference in New Issue
Block a user