1
0
mirror of https://github.com/rancher/types.git synced 2025-09-02 05:35:16 +00:00

Update ToInternal

This commit is contained in:
Darren Shepherd
2018-06-04 21:44:54 -07:00
parent 7c20e28b3c
commit 986f420630
19 changed files with 62 additions and 32 deletions

View File

@@ -26,7 +26,7 @@ func (n *NamespaceReference) FromInternal(data map[string]interface{}) {
}
}
func (n *NamespaceReference) ToInternal(data map[string]interface{}) {
func (n *NamespaceReference) ToInternal(data map[string]interface{}) error {
for _, path := range n.fields {
convert.Transform(data, path, func(input interface{}) interface{} {
parts := strings.SplitN(convert.ToString(input), ":", 2)
@@ -36,6 +36,8 @@ func (n *NamespaceReference) ToInternal(data map[string]interface{}) {
return parts[0]
})
}
return nil
}
func (n *NamespaceReference) ModifySchema(schema *types.Schema, schemas *types.Schemas) error {