mirror of
https://github.com/beego/bee.git
synced 2024-11-26 01:11:30 +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)
|
tmp = make([]rune, 0)
|
||||||
j += 1
|
j += 1
|
||||||
start = false
|
start = false
|
||||||
continue
|
if j == 1 {
|
||||||
} else {
|
continue
|
||||||
st[j] = strings.TrimSpace(ss[i+1:])
|
} else {
|
||||||
break
|
st[j] = strings.TrimSpace(ss[i+1:])
|
||||||
|
break
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
start = true
|
start = true
|
||||||
|
Loading…
Reference in New Issue
Block a user