aboutsummaryrefslogtreecommitdiff
path: root/go/game/deck.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/game/deck.go')
-rw-r--r--go/game/deck.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/go/game/deck.go b/go/game/deck.go
index 569a952d..1f9539a9 100644
--- a/go/game/deck.go
+++ b/go/game/deck.go
@@ -59,6 +59,10 @@ func NewDeckFromCardPaths(cardPaths []string) *Deck {
func NewDeckFromDeckList(deckList string) *Deck {
cardPaths := []string{}
+
+ // trim last trailing newline
+ deckList = strings.Trim(deckList, "\n")
+
lines := strings.Split(deckList, "\n")
for _, line := range lines {
tokens := strings.SplitN(line, " ", 2)