From 2ce1e8607e4801e7533ef40c788ea8a6646c46a3 Mon Sep 17 00:00:00 2001 From: Marty Sluijtman Date: Tue, 23 Aug 2022 17:16:52 +0200 Subject: [PATCH] Fixed formatting bug Printing an int where not desired. --- Coin/Coin.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Coin/Coin.go b/Coin/Coin.go index 2087560..a9f561e 100644 --- a/Coin/Coin.go +++ b/Coin/Coin.go @@ -3,6 +3,7 @@ package Coin import ( "fmt" "math/rand" + "strings" "time" "github.com/fatih/color" @@ -40,7 +41,7 @@ func Toss(castAmount int) { if castAmount > 1 { color.Yellow("Tossing %d coins...\n", castAmount) } else { - color.Yellow("Tossing coin...\n", castAmount) + color.Yellow("Tossing coin...\n") } - fmt.Println(fmt.Sprint(coins)) + fmt.Println(strings.Trim(fmt.Sprint(coins), "[]")) }