1
0
mirror of https://github.com/beego/bee.git synced 2024-12-26 16:40:50 +00:00

修改生成文档时,@Sucess 第三个参数解析错误的问题

原来的代码,当第三个参数有多个空格时,比如
// @Success 200 {string} delete success!
第三个参数会解析成success!,即会忽略第一个空格前的单词,修改后,可以正常解析。
This commit is contained in:
itcbx 2015-08-29 15:14:21 +08:00
parent f11cad19ec
commit d7b23aa54f

View File

@ -395,10 +395,13 @@ func parserComments(comments *ast.CommentGroup, funcName, controllerName, pkgpat
tmp = make([]rune, 0)
j += 1
start = false
continue
} else {
st[j] = strings.TrimSpace(ss[i+1:])
break
if j == 1 {
continue
} else {
st[j] = strings.TrimSpace(ss[i+1:])
break
}
}
} else {
start = true