From 9ab90c4b87458e1dd28b06bc2fd370a8d013185d Mon Sep 17 00:00:00 2001 From: tiaoxizhan Date: Fri, 27 Dec 2024 23:28:19 +0800 Subject: [PATCH] chore(): fix slice initialization error (#338) --- util/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/util.go b/util/util.go index 8332ed1..7ec89c6 100644 --- a/util/util.go +++ b/util/util.go @@ -163,7 +163,7 @@ func ReadFilenames(dir string) []string { } // Create array of names of files which are stored in dir // used later to set valid name for received files - filenames := make([]string, len(files)) + filenames := make([]string, 0, len(files)) for _, fi := range files { filenames = append(filenames, fi.Name()) }