From 2ac2bb527fe4e924c7a1242ae8c10ed27dbf2b5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geyslan=20Greg=C3=B3rio?= Date: Thu, 24 Aug 2023 16:54:17 -0300 Subject: [PATCH] fix(map): fix error wrap `fmt.Errorf call has more than one error-wrapping directive %w` --- map-low.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/map-low.go b/map-low.go index 2e7e69a1..27d0fbfd 100644 --- a/map-low.go +++ b/map-low.go @@ -69,7 +69,7 @@ func CreateMap(mapType MapType, mapName string, keySize, valueSize, maxEntries i info, errInfo := GetMapInfoByFD(int(fdC)) if errInfo != nil { if errClose := syscall.Close(int(fdC)); errClose != nil { - return nil, fmt.Errorf("could not create map %s: %w, %w", mapName, errInfo, errClose) + return nil, fmt.Errorf("could not create map %s: %w, %v", mapName, errInfo, errClose) } return nil, fmt.Errorf("could not create map %s: %w", mapName, errInfo)