From 0834420d89f7ac8f8ad023b92c25e40e87a3c985 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sun, 5 Apr 2026 18:24:59 -0300 Subject: [PATCH] replace %w with %s in lineProcessingError(). --- blossom.go | 4 ++-- encode.go | 6 +++--- relay.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/blossom.go b/blossom.go index 1b05c07..d8882b3 100644 --- a/blossom.go +++ b/blossom.go @@ -112,7 +112,7 @@ var blossomCmd = &cli.Command{ client := blossom.NewClient(server, keyer) bd, err := client.UploadFilePath(ctx, fpath) if err != nil { - ctx = lineProcessingError(ctx, "failed to upload '%s' to '%s': %w", fpath, server, err) + ctx = lineProcessingError(ctx, "failed to upload '%s' to '%s': %s", fpath, server, err) continue } @@ -281,7 +281,7 @@ if any of the files are not found the command will fail, otherwise it will succe } bd, err := client.MirrorBlob(ctx, blobURL) if err != nil { - ctx = lineProcessingError(ctx, "failed to mirror '%s': %w", blobURL, err) + ctx = lineProcessingError(ctx, "failed to mirror '%s': %s", blobURL, err) continue } out, _ := json.Marshal(bd) diff --git a/encode.go b/encode.go index fa404c3..29600bd 100644 --- a/encode.go +++ b/encode.go @@ -82,7 +82,7 @@ var encode = &cli.Command{ for target := range getStdinLinesOrArguments(c.Args()) { pk, err := nostr.PubKeyFromHexCheap(target) if err != nil { - ctx = lineProcessingError(ctx, "invalid public key '%s': %w", target, err) + ctx = lineProcessingError(ctx, "invalid public key '%s': %s", target, err) continue } @@ -101,7 +101,7 @@ var encode = &cli.Command{ for target := range getStdinLinesOrArguments(c.Args()) { sk, err := nostr.SecretKeyFromHex(target) if err != nil { - ctx = lineProcessingError(ctx, "invalid private key '%s': %w", target, err) + ctx = lineProcessingError(ctx, "invalid private key '%s': %s", target, err) continue } @@ -132,7 +132,7 @@ var encode = &cli.Command{ for target := range getStdinLinesOrArguments(c.Args()) { pk, err := nostr.PubKeyFromHexCheap(target) if err != nil { - ctx = lineProcessingError(ctx, "invalid public key '%s': %w", target, err) + ctx = lineProcessingError(ctx, "invalid public key '%s': %s", target, err) continue } diff --git a/relay.go b/relay.go index 5b0ff9c..0f9f66d 100644 --- a/relay.go +++ b/relay.go @@ -24,7 +24,7 @@ var relay = &cli.Command{ info, err := nip11.Fetch(ctx, url) if err != nil { - ctx = lineProcessingError(ctx, "failed to fetch '%s' information document: %w", url, err) + ctx = lineProcessingError(ctx, "failed to fetch '%s' information document: %s", url, err) continue }