diff --git a/shared/definition.go b/shared/definition.go index 0a7c673b..dde3e441 100644 --- a/shared/definition.go +++ b/shared/definition.go @@ -41,7 +41,7 @@ const ( ) // UnmarshalYAML validates the filter type. -func (d DefinitionFilterType) UnmarshalYAML(unmarshal func(interface{}) error) error { +func (d *DefinitionFilterType) UnmarshalYAML(unmarshal func(interface{}) error) error { var filterType string err := unmarshal(&filterType) @@ -53,6 +53,8 @@ func (d DefinitionFilterType) UnmarshalYAML(unmarshal func(interface{}) error) e return fmt.Errorf("Invalid filter type %q", filterType) } + *d = DefinitionFilterType(filterType) + return nil }