aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-07-17 20:23:14 +0200
committerMichael Muré <batolettre@gmail.com>2018-07-17 20:23:14 +0200
commit1332a6ec0a00b2475bc2b7b35b4c61425361d6b6 (patch)
treeff9ee93ea4a3bafc99d049d4f0c7b9f199ff0fec /util
parent9e6c687fca71103fd7550e25c471b9f805337b09 (diff)
downloadgit-bug-1332a6ec0a00b2475bc2b7b35b4c61425361d6b6.tar.gz
ls: add some colors
Diffstat (limited to 'util')
-rw-r--r--util/colors.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/util/colors.go b/util/colors.go
new file mode 100644
index 00000000..5169bef1
--- /dev/null
+++ b/util/colors.go
@@ -0,0 +1,21 @@
+package util
+
+import "github.com/fatih/color"
+
+var (
+ Black = color.New(color.FgBlack).SprintFunc()
+ BlackBg = color.New(color.BgBlack, color.FgWhite).SprintFunc()
+ White = color.New(color.FgWhite).SprintFunc()
+ WhiteBold = color.New(color.FgWhite, color.Bold).SprintFunc()
+ Yellow = color.New(color.FgYellow).SprintFunc()
+ YellowBold = color.New(color.FgYellow, color.Bold).SprintFunc()
+ YellowBg = color.New(color.BgYellow, color.FgBlack).SprintFunc()
+ Green = color.New(color.FgGreen).SprintFunc()
+ GreenBg = color.New(color.BgGreen, color.FgBlack).SprintFunc()
+ Red = color.New(color.FgRed).SprintFunc()
+ Cyan = color.New(color.FgCyan).SprintFunc()
+ CyanBg = color.New(color.BgCyan, color.FgBlack).SprintFunc()
+ Blue = color.New(color.FgBlue).SprintFunc()
+ BlueBg = color.New(color.BgBlue).SprintFunc()
+ Magenta = color.New(color.FgMagenta).SprintFunc()
+)