multi: fix fmt.Errorf error wrapping
Refactor fmt.Errorf usage to correctly wrap errors instead of using non-wrapping format verbs.
This commit is contained in:
103 files changed
+426
-390
No files matched your search
@@ -586,11 +586,11 @@ func replaceProtoMsg(target interface{}, replacement interface{}) error {
|
||||
|
||||
replacementBytes, err := proto.Marshal(replacementMsg)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error marshaling replacement: %v", err)
|
||||
return fmt.Errorf("error marshaling replacement: %w", err)
|
||||
}
|
||||
err = proto.Unmarshal(replacementBytes, targetMsg)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error unmarshaling replacement: %v", err)
|
||||
return fmt.Errorf("error unmarshaling replacement: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user