diff --git a/mapstructure_test.go b/mapstructure_test.go index 652c8ac5..72e02582 100644 --- a/mapstructure_test.go +++ b/mapstructure_test.go @@ -160,6 +160,8 @@ type StructWithOmitEmpty struct { OmitMapField map[string]interface{} `mapstructure:"omittable-map,omitempty"` NestedField *Nested `mapstructure:"visible-nested"` OmitNestedField *Nested `mapstructure:"omittable-nested,omitempty"` +} + type Required struct { RequiredBar string `mapstructure:"bar,required"` Value string `mapstructure:"foo"` @@ -2233,6 +2235,9 @@ func TestDecode_StructTaggedWithOmitempty_KeepNonEmptyValues(t *testing.T) { if !reflect.DeepEqual(actual, expected) { t.Fatalf("Decode() expected: %#v, got: %#v", expected, actual) + } +} + func TestRequired(t *testing.T) { t.Parallel()