1
0
mirror of https://github.com/beego/bee.git synced 2024-11-21 13:40:53 +00:00

support interface type

This commit is contained in:
wucheng 2020-08-26 11:17:09 +08:00
parent 53b0b68d00
commit 2c673b7d1e

View File

@ -1260,6 +1260,8 @@ func typeAnalyser(f *ast.Field) (isSlice bool, realType, swaggerType string) {
return false, astTypeMap, basicTypes[val]
}
return false, val, astTypeObject
case *ast.InterfaceType:
return false, "interface", astTypeObject
}
basicType := fmt.Sprint(f.Type)
if object, isStdLibObject := stdlibObject[basicType]; isStdLibObject {