Add v16.8.0

This commit is contained in:
Jan Stabenow
2022-06-03 17:21:52 +02:00
parent c8bebd95ef
commit 9746248c10
431 changed files with 14782 additions and 13944 deletions

View File

@@ -26,6 +26,8 @@ const (
STRING = "string"
// FUNC represent a function value.
FUNC = "func"
// INTERFACE represent a interface value.
INTERFACE = "interface{}"
// ANY represent a any value.
ANY = "any"
// NIL represent a empty value.
@@ -104,7 +106,8 @@ func IsGolangPrimitiveType(typeName string) bool {
"float32",
"float64",
"bool",
"string":
"string",
"any":
return true
}
@@ -132,6 +135,7 @@ func TypeDocName(pkgName string, spec *ast.TypeSpec) string {
}
}
}
if spec.Name != nil {
return fullTypeName(strings.Split(pkgName, ".")[0], spec.Name.Name)
}
@@ -167,6 +171,7 @@ func BuildCustomSchema(types []string) (*spec.Schema, error) {
if len(types) == 1 {
return nil, errors.New("need array item type after array")
}
schema, err := BuildCustomSchema(types[1:])
if err != nil {
return nil, err
@@ -177,6 +182,7 @@ func BuildCustomSchema(types []string) (*spec.Schema, error) {
if len(types) == 1 {
return PrimitiveSchema(types[0]), nil
}
schema, err := BuildCustomSchema(types[1:])
if err != nil {
return nil, err