From ebd93964dee59c38eaf5713ec7b235843f35a9cd Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Thu, 4 Jun 2026 09:21:52 +0900 Subject: [PATCH] blossom: drop unnecessary else after early return in mirror command. --- blossom.go | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/blossom.go b/blossom.go index 3bbd298..ea99f1a 100644 --- a/blossom.go +++ b/blossom.go @@ -283,28 +283,27 @@ if any of the files are not found the command will fail, otherwise it will succe out, _ := json.Marshal(bd) stdout(out) return nil - } else { - for input := range getJsonsOrBlank() { - if input == "{}" { - continue - } - - blobURL := input - if err := json.Unmarshal([]byte(input), &bd); err == nil { - blobURL = bd.URL - } - bd, err := client.MirrorBlob(ctx, blobURL) - if err != nil { - ctx = lineProcessingError(ctx, "failed to mirror '%s': %s", blobURL, err) - continue - } - out, _ := json.Marshal(bd) - stdout(out) - } - - exitIfLineProcessingError(ctx) } + for input := range getJsonsOrBlank() { + if input == "{}" { + continue + } + + blobURL := input + if err := json.Unmarshal([]byte(input), &bd); err == nil { + blobURL = bd.URL + } + bd, err := client.MirrorBlob(ctx, blobURL) + if err != nil { + ctx = lineProcessingError(ctx, "failed to mirror '%s': %s", blobURL, err) + continue + } + out, _ := json.Marshal(bd) + stdout(out) + } + + exitIfLineProcessingError(ctx) return nil }, },