From d71b4bc62b82ffc60133393bf3eaa94157d1f588 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Fri, 27 Sep 2024 01:22:27 +0800 Subject: [PATCH] Fix CT log loading error message (#7725) The intention here should be to initialize a slice with a capacity of len(remaining) rather than initializing the length of this slice, so that the resulting error message doesn't start with empty-string entries. --- ctpolicy/loglist/loglist.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctpolicy/loglist/loglist.go b/ctpolicy/loglist/loglist.go index 95cc724a150..f08a36495a3 100644 --- a/ctpolicy/loglist/loglist.go +++ b/ctpolicy/loglist/loglist.go @@ -217,7 +217,7 @@ func (ll List) subset(names []string) (List, error) { } if len(remaining) > 0 { - missed := make([]string, len(remaining)) + missed := make([]string, 0, len(remaining)) for name := range remaining { missed = append(missed, fmt.Sprintf("%q", name)) }