Skip to content

Commit 6dd0e2b

Browse files
authored
fix(map): fix error wrap (#368)
`fmt.Errorf call has more than one error-wrapping directive %w`
1 parent 21cf435 commit 6dd0e2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

map-low.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func CreateMap(mapType MapType, mapName string, keySize, valueSize, maxEntries i
6969
info, errInfo := GetMapInfoByFD(int(fdC))
7070
if errInfo != nil {
7171
if errClose := syscall.Close(int(fdC)); errClose != nil {
72-
return nil, fmt.Errorf("could not create map %s: %w, %w", mapName, errInfo, errClose)
72+
return nil, fmt.Errorf("could not create map %s: %w, %v", mapName, errInfo, errClose)
7373
}
7474

7575
return nil, fmt.Errorf("could not create map %s: %w", mapName, errInfo)

0 commit comments

Comments
 (0)