summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshogo-ma <Choroma194@gmail.com>2018-01-04 22:02:56 +0900
committershogo-ma <Choroma194@gmail.com>2018-01-04 22:02:56 +0900
commitfd7acd890c1b7b54575fa6ca29562b5181a1044e (patch)
treece912d3851ac63a604a98ae7ff4719b813fbadc9
parentc51bfb57cd5c71f5a3f1c432e864d9b51d239210 (diff)
use iota identifier
-rw-r--r--color/color.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/color/color.go b/color/color.go
index e9f5f64..653ac05 100644
--- a/color/color.go
+++ b/color/color.go
@@ -5,19 +5,19 @@ import (
)
const (
- FgBlack = 0
- FgRed = 1
- FgGreen = 2
- FgYellow = 3
- FgBlue = 4
- FgPurple = 5
+ FgBlack = iota
+ FgRed
+ FgGreen
+ FgYellow
+ FgBlue
+ FgPurple
)
const (
- Regular = 1
- Light = 2
- Highlight = 3
- Underline = 4
+ Regular = iota + 1
+ Light
+ Highlight
+ Underline
)
func colorString(color int, style int, format string, a ...interface{}) string {