mirror of
https://github.com/rancher/norman.git
synced 2025-09-25 14:46:57 +00:00
Merge pull request #228 from ibuildthecloud/unit64
Add support for Uint64
This commit is contained in:
@@ -286,7 +286,9 @@ func (s *Schemas) readFields(schema *Schema, t reflect.Type) error {
|
|||||||
schemaField.Nullable = false
|
schemaField.Nullable = false
|
||||||
schemaField.Default = false
|
schemaField.Default = false
|
||||||
} else if fieldType.Kind() == reflect.Int ||
|
} else if fieldType.Kind() == reflect.Int ||
|
||||||
|
fieldType.Kind() == reflect.Uint32 ||
|
||||||
fieldType.Kind() == reflect.Int32 ||
|
fieldType.Kind() == reflect.Int32 ||
|
||||||
|
fieldType.Kind() == reflect.Uint64 ||
|
||||||
fieldType.Kind() == reflect.Int64 {
|
fieldType.Kind() == reflect.Int64 {
|
||||||
schemaField.Nullable = false
|
schemaField.Nullable = false
|
||||||
schemaField.Default = 0
|
schemaField.Default = 0
|
||||||
@@ -440,6 +442,8 @@ func (s *Schemas) determineSchemaType(version *APIVersion, t reflect.Type) (stri
|
|||||||
fallthrough
|
fallthrough
|
||||||
case reflect.Uint32:
|
case reflect.Uint32:
|
||||||
fallthrough
|
fallthrough
|
||||||
|
case reflect.Uint64:
|
||||||
|
fallthrough
|
||||||
case reflect.Int64:
|
case reflect.Int64:
|
||||||
return "int", nil
|
return "int", nil
|
||||||
case reflect.Interface:
|
case reflect.Interface:
|
||||||
|
Reference in New Issue
Block a user