diff --git a/lists/list_cache.go b/lists/list_cache.go index e6d826943..0244ce306 100644 --- a/lists/list_cache.go +++ b/lists/list_cache.go @@ -273,7 +273,7 @@ func readFile(file string) (io.ReadCloser, error) { func processFile(link string, ch chan<- []string, wg *sync.WaitGroup) { defer wg.Done() - var result []string + result := make([]string, 0) var r io.ReadCloser diff --git a/lists/list_cache_test.go b/lists/list_cache_test.go index c8e5d851d..05d188b0c 100644 --- a/lists/list_cache_test.go +++ b/lists/list_cache_test.go @@ -102,7 +102,7 @@ var _ = Describe("ListCache", func() { })) defer s.Close() lists := map[string][]string{ - "gr1": {s.URL}, + "gr1": {s.URL, emptyFile.Name()}, } timeout = 100 * time.Millisecond