func (c *CardFiles) InsertCount(path string, name *string, count int) {
	_, found := c.Counts[path]
	if !found {
		c.Cards = append(c.Cards, CardInfo{
			Path: path,
			Name: name,
		})
		c.Counts[path] = count
	} else {
		c.Counts[path] = c.Counts[path] + count
	}
}
InsertCount inserts several new cards in a CardFiles struct.
package custom
import (
	"bufio"
	"io"
	"regexp"
	"strconv"
	"strings"
	"github.com/jeandeaual/tts-deckconverter/log"
	"github.com/jeandeaual/tts-deckconverter/plugins"
)
var cardLineRegexps = []*regexp.Regexp{
	regexp.MustCompile(`^\s*(?:(?P<Count>\d+)x?\s+)?(?P<Path>.+)\s+\((?P<Name>.+)\)$`),
	regexp.MustCompile(`^\s*(?:(?P<Count>\d+)x?\s+)?(?P<Path>.+)$`),
}
type CardInfo struct {
	Path string
	Name *string
}
type CardFiles struct {
	Cards []CardInfo
	Counts map[string]int
}
func NewCardNames() *CardFiles {
	counts := make(map[string]int)
	return &CardFiles{Counts: counts}
}
func (c *CardFiles) Insert(path string, name *string) {
	c.InsertCount(path, name, 1)
}