12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- package aes
- import "strings"
- import "strconv"
- //import "fmt"
- type Effect int
- type Effects []Effect
- func (effects Effects) Format() string {
- intStrs := make([]string, len(effects))
- for i, e := range effects {
- intStrs[i] = strconv.Itoa(int(e))
- }
- return strings.Join(intStrs, ";")
- }
- // Effect codes.
- const (
- EffectReset Effect = iota
- EffectBold
- EffectDim
- EffectItalic
- EffectUnderline
- EffectBlinking
- )
- // Keep effect codes.
- const (
- EffectInverse Effect = 7 + iota
- EffectHidden
- // Effect strikethrough.
- EffectStirke
- )
- // Foreground effect codes.
- const (
- EffectBlackFG = 30 + iota
- EffectRedFG
- EffectGreenFG
- EffectYellowFG
- EffectBlueFG
- EffectMagentaFG
- EffectCyanFG
- EffectWhiteFG
- EffectDefaultFG
- )
- // Background effect codes.
- const (
- EffectBlackBG Effect = 40 + iota
- EffectRedBG
- EffectGreenBG
- EffectYellowBG
- EffectBlueBG
- EffectMagentaBG
- EffectCyanBG
- EffectWhiteBG
- EffectDefaultBG
- )
|