From 70f5111b662a2ec85447ae81dcc1ec7399c9595e Mon Sep 17 00:00:00 2001 From: cui fliter Date: Fri, 4 Oct 2024 20:27:33 +0800 Subject: [PATCH] fix: fix slice init length --- antiphishing/antiphishing.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/antiphishing/antiphishing.go b/antiphishing/antiphishing.go index ff13e523b0..7cfb889191 100644 --- a/antiphishing/antiphishing.go +++ b/antiphishing/antiphishing.go @@ -235,7 +235,7 @@ func queryPhishingLinks(input []string) (string, error) { return "", err } - badDomains := make([]string, len(bitflowAntifishResponse.Matches)) + badDomains := make([]string, 0, len(bitflowAntifishResponse.Matches)) if bitflowAntifishResponse.Match { for _, match := range bitflowAntifishResponse.Matches { // only flag domains which have a low trust rating, this varies between 0 and 1, 0 means high trust, 1 means no trust.