support more color choices

This commit is contained in:
Kevin Schoon 2018-02-03 13:40:38 -05:00
parent 987fbfd261
commit bd32d957f8
1 changed files with 16 additions and 4 deletions

View File

@ -66,10 +66,22 @@ type Config struct {
}
var colorMap = map[string]*color.Color{
"red": color.New(color.FgRed),
"blue": color.New(color.FgBlue),
"green": color.New(color.FgGreen),
"white": color.New(color.FgWhite),
"black": color.New(color.FgBlack),
"hiblack": color.New(color.FgHiBlack),
"blue": color.New(color.FgBlue),
"hiblue": color.New(color.FgHiBlue),
"cyan": color.New(color.FgCyan),
"hicyan": color.New(color.FgHiCyan),
"green": color.New(color.FgGreen),
"higreen": color.New(color.FgHiGreen),
"magenta": color.New(color.FgMagenta),
"himagenta": color.New(color.FgHiMagenta),
"red": color.New(color.FgRed),
"hired": color.New(color.FgHiRed),
"white": color.New(color.FgWhite),
"hiwrite": color.New(color.FgHiWhite),
"yellow": color.New(color.FgYellow),
"hiyellow": color.New(color.FgHiYellow),
}
func (c *Config) UnmarshalJSON(raw []byte) error {