From 20b9e5353e2ea94ec58df1eb09f2fdffc58326fc Mon Sep 17 00:00:00 2001 From: dudaodong Date: Wed, 6 Apr 2022 11:33:48 +0800 Subject: [PATCH] fix: fix goreport issue --- maputil/map.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/maputil/map.go b/maputil/map.go index dcb6bb9..199cea8 100644 --- a/maputil/map.go +++ b/maputil/map.go @@ -69,7 +69,7 @@ func Intersect[K comparable, V any](maps ...map[K]V) map[K]V { return maps[0] } - res := make(map[K]V) + var res map[K]V reducer := func(m1, m2 map[K]V) map[K]V { m := make(map[K]V) @@ -93,7 +93,6 @@ func Intersect[K comparable, V any](maps ...map[K]V) map[K]V { return res } - // Minus creates an map of whose key in mapA but not in mapB func Minus[K comparable, V any](mapA, mapB map[K]V) map[K]V { res := make(map[K]V)