From 95961a44ba7aa409e397a6fb22bef4df5258d605 Mon Sep 17 00:00:00 2001 From: Zvonimir Pavlinovic Date: Thu, 1 Feb 2024 14:12:28 +0000 Subject: [PATCH] internal/vulncheck: refactor a loop with an append This makes staticcheck happy and resolves builders' failures. Change-Id: I90c0aa18ee7ca35fd18879d1d4dd5b6c9b0bcfa1 Reviewed-on: https://go-review.googlesource.com/c/vuln/+/560335 Run-TryBot: Zvonimir Pavlinovic Reviewed-by: Maceo Thompson TryBot-Result: Gopher Robot LUCI-TryBot-Result: Go LUCI --- internal/vulncheck/binary.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/vulncheck/binary.go b/internal/vulncheck/binary.go index a683a01..71ccc8a 100644 --- a/internal/vulncheck/binary.go +++ b/internal/vulncheck/binary.go @@ -159,9 +159,7 @@ func allKnownVulnerableSymbols(affVulns affectingVulns) map[string][]string { syms = []string{fmt.Sprintf("%s/*", p.Path)} } - for _, symbol := range syms { - pkgSymbols[p.Path] = append(pkgSymbols[p.Path], symbol) - } + pkgSymbols[p.Path] = append(pkgSymbols[p.Path], syms...) } } }