Skip to content

Commit 4bdba76

Browse files
authored
🌈 Enable colors on Windows
2 parents faecc57 + 96bdf87 commit 4bdba76

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

β€Žcmd/root.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
package cmd
22

3+
import (
4+
"github.com/mattn/go-colorable"
5+
)
6+
37
func Main() {
8+
defer colorable.EnableColorsStdout(nil)()
9+
410
help, isThereFileArguments, files := getParametersAndFlags()
511

612
if help {
@@ -9,7 +15,7 @@ func Main() {
915
}
1016

1117
if isThereFileArguments {
12-
text := JoinFilesToString(files)
18+
text := JoinFilesToString(files)
1319
PrintWithScanner(text)
1420
return
1521
}

β€Žgo.mod

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
module github.com/UltiRequiem/chigo
22

33
go 1.17
4+
5+
require (
6+
github.com/mattn/go-colorable v0.1.11 // indirect
7+
github.com/mattn/go-isatty v0.0.14 // indirect
8+
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 // indirect
9+
)

0 commit comments

Comments
Β (0)