Fix outputs of missing
This commit is contained in:
parent
135f4a93a5
commit
5fb1cb63a2
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
|
||||
@ -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,
|
||||
}),
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user