Last active
January 9, 2019 01:04
-
-
Save TwiN/4606266667d6330c6cbf8de73439a120 to your computer and use it in GitHub Desktop.
Colors in Go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package color | |
import "runtime" | |
var Reset = "\033[0m" | |
var Red = "\033[31m" | |
var Green = "\033[32m" | |
var Yellow = "\033[33m" | |
var Blue = "\033[34m" | |
var Purple = "\033[35m" | |
var Cyan = "\033[36m" | |
var Gray = "\033[37m" | |
var White = "\033[97m" | |
func init() { | |
if runtime.GOOS == "windows" { | |
Reset = "" | |
Red = "" | |
Green = "" | |
Yellow = "" | |
Blue = "" | |
Purple = "" | |
Cyan = "" | |
Gray = "" | |
White = "" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment