Fixed formatting bug

Printing an int where not desired.
This commit is contained in:
Nox Sluijtman 2022-08-23 17:16:52 +02:00
parent 9142a36897
commit 2ce1e8607e

View file

@ -3,6 +3,7 @@ package Coin
import ( import (
"fmt" "fmt"
"math/rand" "math/rand"
"strings"
"time" "time"
"github.com/fatih/color" "github.com/fatih/color"
@ -40,7 +41,7 @@ func Toss(castAmount int) {
if castAmount > 1 { if castAmount > 1 {
color.Yellow("Tossing %d coins...\n", castAmount) color.Yellow("Tossing %d coins...\n", castAmount)
} else { } else {
color.Yellow("Tossing coin...\n", castAmount) color.Yellow("Tossing coin...\n")
} }
fmt.Println(fmt.Sprint(coins)) fmt.Println(strings.Trim(fmt.Sprint(coins), "[]"))
} }