From 5fb1cb63a2258d8ee902871ce163f9a0f96ba6a1 Mon Sep 17 00:00:00 2001 From: Florian Baumann Date: Thu, 14 Sep 2023 17:08:14 +0200 Subject: [PATCH] Fix outputs of missing --- src/serra/check.go | 6 +++--- src/serra/helpers.go | 2 +- src/serra/update.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/serra/check.go b/src/serra/check.go index ea62809..edee563 100644 --- a/src/serra/check.go +++ b/src/serra/check.go @@ -49,16 +49,16 @@ func checkCards(cards []string, detail bool) error { // If Card is in collection, print yes. if len(co) >= 1 { c := co[0] - fmt.Sprintf("PRESENT %s \"%s\" (%s, %.2f%s)", card, c.Name, c.Rarity, c.getValue(foil), getCurrency()) + fmt.Printf("PRESENT %s \"%s\" (%s, %.2f%s)", card, c.Name, c.Rarity, c.getValue(foil), getCurrency()) continue } else { if detail { // fetch card from scyrfall if --detail was given c, _ := fetchCard(setName, collectorNumber) - fmt.Sprintf("MISSING %s \"%s\" (%s, %.2f%s)", card, c.Name, c.Rarity, c.getValue(foil), getCurrency()) + fmt.Printf("MISSING %s \"%s\" (%s, %.2f%s)", card, c.Name, c.Rarity, c.getValue(foil), getCurrency()) } else { // Just print, the card name was not found - fmt.Sprintf("MISSING \"%s\"", card) + fmt.Printf("MISSING \"%s\"", card) } } } diff --git a/src/serra/helpers.go b/src/serra/helpers.go index 7d9e446..4328810 100644 --- a/src/serra/helpers.go +++ b/src/serra/helpers.go @@ -72,7 +72,7 @@ func modifyCardCount(coll *Collection, c *Card, amount int64, foil bool) error { } else { total = storedCard.SerraCount + amount } - fmt.Sprintf("Updating Card \"%s\" amount to %d", storedCard.Name, total) + fmt.Printf("Updating Card \"%s\" amount to %d", storedCard.Name, total) return nil } diff --git a/src/serra/update.go b/src/serra/update.go index 87a46f5..19dabb7 100644 --- a/src/serra/update.go +++ b/src/serra/update.go @@ -74,7 +74,7 @@ var updateCmd = &cobra.Command{ SaucerHead: "[green]>[reset]", SaucerPadding: " ", BarStart: "|", - BarEnd: fmt.Sprintf("| %s%s%s", Pink, set.Name, Reset), + BarEnd: set.Name, }), )