From 7bc742f82da01fd805ec5627c9e5afc96457401a Mon Sep 17 00:00:00 2001 From: Sebastian Bugge Date: Mon, 13 May 2024 11:59:59 +0200 Subject: [PATCH] Simplify logic. --- config.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/config.go b/config.go index c6e6ab8..e383ff9 100644 --- a/config.go +++ b/config.go @@ -153,8 +153,7 @@ func LoadConfig(filename string, config interface{}) error { switch field.Kind() { case reflect.Slice: - // Create a empty slice, if no slice exists for this key already. - if field.IsNil() || lastUpdate[*key] == 0 { + if lastUpdate[*key] == 0 { field.Set(reflect.MakeSlice(field.Type(), 0, 0)) }