Skip to content

Commit 96bdf87

Browse files
committed
Enable colors on Windows
1 parent 9e1986c commit 96bdf87

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

cmd/root.go

Lines changed: 6 additions & 0 deletions
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 {

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)