1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-01 15:18:20 +00:00

Add intOrString and dnsLabel types

This commit is contained in:
Darren Shepherd
2017-12-29 15:06:36 -07:00
parent 6c007d23ef
commit 162f6088af
4 changed files with 14 additions and 1 deletions

View File

@@ -239,6 +239,14 @@ func (b *Builder) convert(fieldType string, value interface{}, op Operation) (in
return convert.ToString(value), nil
case "string":
return convert.ToString(value), nil
case "dnsLabel":
return convert.ToString(value), nil
case "intOrString":
num, err := convert.ToNumber(value)
if err == nil {
return num, nil
}
return convert.ToString(value), nil
case "base64":
return convert.ToString(value), nil
case "reference":