From 5406b1e4e052d901041c273a6a3e7fe75f0292ea Mon Sep 17 00:00:00 2001 From: cui fliter Date: Fri, 4 Oct 2024 16:14:54 +0800 Subject: [PATCH] fix: fix slice init length --- alert/store.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alert/store.go b/alert/store.go index 1748090dc8..79d44bc796 100644 --- a/alert/store.go +++ b/alert/store.go @@ -809,7 +809,7 @@ func (s *Store) Feedback(ctx context.Context, alertIDs []int) ([]Feedback, error return nil, err } - ids := make([]int32, len(alertIDs)) + ids := make([]int32, 0, len(alertIDs)) for _, id := range alertIDs { ids = append(ids, int32(id)) }