1
0

Task Attachments (#104)

This commit is contained in:
konrad
2019-10-16 20:52:29 +00:00
committed by Gitea
parent e2f481a6e5
commit 2169464983
349 changed files with 22540 additions and 5267 deletions

View File

@ -2,11 +2,12 @@ package swag
import "fmt"
// CheckSchemaType begins panicking if typeName is not a name of primitive type
func CheckSchemaType(typeName string) {
// CheckSchemaType checks if typeName is not a name of primitive type
func CheckSchemaType(typeName string) error {
if !IsPrimitiveType(typeName) {
panic(fmt.Errorf("%s is not basic types", typeName))
return fmt.Errorf("%s is not basic types", typeName)
}
return nil
}
// IsPrimitiveType determine whether the type name is a primitive type