replace %w with %s in lineProcessingError().

This commit is contained in:
fiatjaf
2026-04-05 18:24:59 -03:00
parent 217352ed0b
commit 0834420d89
3 changed files with 6 additions and 6 deletions

View File

@@ -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)

View File

@@ -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
}

View File

@@ -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
}