From 4e145d85d7a9eb784c5f6f32007486ecbec26a53 Mon Sep 17 00:00:00 2001 From: Lars Gierth Date: Wed, 3 Oct 2018 08:04:32 +0200 Subject: [PATCH] Fix handling of null strings --- config/types.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/types.go b/config/types.go index 376cc64f0728..58451c68f12d 100644 --- a/config/types.go +++ b/config/types.go @@ -17,7 +17,11 @@ func (o *Strings) UnmarshalJSON(data []byte) error { if err := json.Unmarshal(data, &value); err != nil { return err } - *o = []string{value} + if len(value) == 0 { + *o = []string{} + } else { + *o = []string{value} + } return nil }