Skip to content

Commit

Permalink
fix(map): fix error wrap (#368)
Browse files Browse the repository at this point in the history
`fmt.Errorf call has more than one error-wrapping directive %w`
  • Loading branch information
geyslan authored Aug 24, 2023
1 parent 21cf435 commit 6dd0e2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion map-low.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6dd0e2b

Please sign in to comment.