From 39194a076b55a57fcc215d3c6d22a6c5b9618730 Mon Sep 17 00:00:00 2001 From: Nandor Kracser Date: Wed, 6 May 2020 10:59:36 +0200 Subject: [PATCH] fix tests Signed-off-by: Nandor Kracser --- mapstructure_test.go | 5 +++++ 1 file changed, 5 insertions(+) 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()