From 7582884f30f6cc070428669c6d3760a035b7bc26 Mon Sep 17 00:00:00 2001 From: Satnam Singh Date: Tue, 9 Dec 2014 12:19:34 -0800 Subject: [PATCH] Do not consider an empty string to be an error in list.go --- pkg/util/list.go | 3 --- pkg/util/list_test.go | 10 ---------- 2 files changed, 13 deletions(-) diff --git a/pkg/util/list.go b/pkg/util/list.go index 1c6ccb98223..a64e0fcf34c 100644 --- a/pkg/util/list.go +++ b/pkg/util/list.go @@ -29,9 +29,6 @@ func (sl *StringList) String() string { func (sl *StringList) Set(value string) error { for _, s := range strings.Split(value, ",") { - if len(s) == 0 { - return fmt.Errorf("value should not be an empty string") - } *sl = append(*sl, s) } return nil diff --git a/pkg/util/list_test.go b/pkg/util/list_test.go index 219e9ba7779..3c10036e274 100644 --- a/pkg/util/list_test.go +++ b/pkg/util/list_test.go @@ -30,13 +30,3 @@ func TestStringListSet(t *testing.T) { t.Errorf("expected: %v, got: %v:", expected, sl) } } - -func TestStringListSetErr(t *testing.T) { - var sl StringList - if err := sl.Set(""); err == nil { - t.Errorf("expected error for empty string") - } - if err := sl.Set(","); err == nil { - t.Errorf("expected error for list of empty strings") - } -}