mirror of
https://github.com/beego/bee.git
synced 2024-11-25 20:10:55 +00:00
修改生成文档时,@Sucess 第三个参数解析错误的问题
原来的代码,当第三个参数有多个空格时,比如 // @Success 200 {string} delete success! 第三个参数会解析成success!,即会忽略第一个空格前的单词,修改后,可以正常解析。
This commit is contained in:
parent
f11cad19ec
commit
d7b23aa54f
11
g_docs.go
11
g_docs.go
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user