Documentation ¶
Index ¶
- func ColorStr(col string, text string) string
- func CopyReplace(dst io.Writer, src io.Reader, regexes []*Colorize) (written int64, err error)
- func Spawn(colors []*Colorize, cmd string, args ...string) error
- func StringToAttributes(colorStr string) ([]color.Attribute, error)
- func TestPattern()
- type Colorize
- type Regexp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyReplace ¶
func StringToAttributes ¶
Converts a comma separated list of colors into color.Attributes
func TestPattern ¶ added in v0.0.5
func TestPattern()
Types ¶
type Colorize ¶
type Colorize struct { ColorStr string `yaml:"color"` Regexp *Regexp `yaml:"regex"` Replace []byte // contains filtered or unexported fields }
The colorize struct contains a regex to match and the teminal color to replace to
type Regexp ¶
a Marshallable Regexp
func (*Regexp) MarshalYAML ¶
implements the yaml.Marshaler interface for Regexp
func (*Regexp) UnmarshalYAML ¶
implements the yaml.Unmarshaler interface for Regexp
Click to show internal directories.
Click to hide internal directories.