fix staticcheck suggestions

This commit is contained in:
Aneurin Barker Snook
2023-11-25 16:51:25 +00:00
parent 3aeea424be
commit 60fc78574e
-2
View File
@@ -58,11 +58,9 @@ func (e Error) WithData(data map[string]interface{}) Error {
if e.Data == nil { if e.Data == nil {
e.Data = map[string]any{} e.Data = map[string]any{}
} }
if data != nil {
for key, value := range data { for key, value := range data {
e.Data[key] = value e.Data[key] = value
} }
}
return e return e
} }