color.go 297 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
package jst

type Color struct {
	Enabled      bool
	KeyHighlight []byte
	PlainValue   []byte
}

func (c *Color) initDefaults() {
	if !c.Enabled {
		return
	}
	if c.KeyHighlight == nil {
		c.KeyHighlight = []byte("\033[32m")
	}
	if c.PlainValue == nil {
		c.PlainValue = []byte("\033[1;34m")
	}
}