Skip to content

Commit 95bb7a1

Browse files
authored
Use native error wrapping (#1098)
1 parent ef05ca1 commit 95bb7a1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bindparam.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func bindSplitPartsToDestinationArray(parts []string, dest interface{}) error {
212212
for i, p := range parts {
213213
err := BindStringToObject(p, newArray.Index(i).Addr().Interface())
214214
if err != nil {
215-
return fmt.Errorf("error setting array element: %s", err)
215+
return fmt.Errorf("error setting array element: %w", err)
216216
}
217217
}
218218
v.Set(newArray)

bindstring.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func BindStringToObject(src string, dst interface{}) error {
168168
err = fmt.Errorf("can not bind to destination of type: %s", t.Kind())
169169
}
170170
if err != nil {
171-
return fmt.Errorf("error binding string parameter: %s", err)
171+
return fmt.Errorf("error binding string parameter: %w", err)
172172
}
173173
return nil
174174
}

0 commit comments

Comments
 (0)