mirror of
https://github.com/beego/bee.git
synced 2025-07-02 08:30:17 +00:00
Merge branch 'develop' of https://github.com/beego/bee into develop
This commit is contained in:
18
g_docs.go
18
g_docs.go
@ -332,7 +332,7 @@ func parserComments(comments *ast.CommentGroup, funcName, controllerName, pkgpat
|
||||
if j == 0 || j == 1 {
|
||||
st[j] = string(tmp)
|
||||
tmp = make([]rune, 0)
|
||||
j += 1
|
||||
j++
|
||||
start = false
|
||||
if j == 1 {
|
||||
continue
|
||||
@ -594,16 +594,14 @@ func typeAnalyser(f *ast.Field) (isSlice bool, realType string) {
|
||||
}
|
||||
if star, ok := arr.Elt.(*ast.StarExpr); ok {
|
||||
return true, fmt.Sprint(star.X)
|
||||
} else {
|
||||
return true, fmt.Sprint(arr.Elt)
|
||||
}
|
||||
} else {
|
||||
switch t := f.Type.(type) {
|
||||
case *ast.StarExpr:
|
||||
return false, fmt.Sprint(t.X)
|
||||
}
|
||||
return false, fmt.Sprint(f.Type)
|
||||
return true, fmt.Sprint(arr.Elt)
|
||||
}
|
||||
switch t := f.Type.(type) {
|
||||
case *ast.StarExpr:
|
||||
return false, fmt.Sprint(t.X)
|
||||
}
|
||||
return false, fmt.Sprint(f.Type)
|
||||
}
|
||||
|
||||
func isBasicType(Type string) bool {
|
||||
@ -627,7 +625,7 @@ var basicTypes = []string{
|
||||
}
|
||||
|
||||
// regexp get json tag
|
||||
func grepJsonTag(tag string) string {
|
||||
func grepJSONTag(tag string) string {
|
||||
r, _ := regexp.Compile(`json:"([^"]*)"`)
|
||||
matches := r.FindAllStringSubmatch(tag, -1)
|
||||
if len(matches) > 0 {
|
||||
|
Reference in New Issue
Block a user