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:
ffranr committed 2024-02-27 11:13:40 +00:00
1 parent 581c16d72f
commit cd566eb097
103 files changed
+426 -390

No files matched your search

+3 -3
View File
@@ -67,7 +67,7 @@ func addTower(ctx *cli.Context) error {
}
pubKey, err := hex.DecodeString(parts[0])
if err != nil {
return fmt.Errorf("invalid public key: %v", err)
return fmt.Errorf("invalid public key: %w", err)
}
address := parts[1]
@@ -160,7 +160,7 @@ func removeTower(ctx *cli.Context) error {
}
pubKey, err := hex.DecodeString(parts[0])
if err != nil {
return fmt.Errorf("invalid public key: %v", err)
return fmt.Errorf("invalid public key: %w", err)
}
var address string
if len(parts) == 2 {
@@ -264,7 +264,7 @@ func getTower(ctx *cli.Context) error {
// about.
pubKey, err := hex.DecodeString(ctx.Args().Get(0))
if err != nil {
return fmt.Errorf("invalid public key: %v", err)
return fmt.Errorf("invalid public key: %w", err)
}
client, cleanUp := getWtclient(ctx)