1
0
mirror of https://github.com/beego/bee.git synced 2024-11-22 05:00:54 +00:00

array format

This commit is contained in:
zhangyanzhe 2017-07-19 14:47:19 +08:00
parent 254174eda6
commit 2b04261f9c

View File

@ -613,7 +613,7 @@ func parserComments(f *ast.FuncDecl, controllerName, pkgpath string) error {
typ := pp[len(pp)-1] typ := pp[len(pp)-1]
if len(pp) >= 2 { if len(pp) >= 2 {
isArray := false isArray := false
if p[1] == "body" || p[1] == "formData" || strings.HasPrefix(p[2], "[]") { if (p[1] == "body" || p[1] == "formData") && strings.HasPrefix(p[2], "[]") {
p[2] = p[2][2:] p[2] = p[2][2:]
isArray = true isArray = true
} }