Skip to content

Instantly share code, notes, and snippets.

@ymgyt
Created March 8, 2018 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ymgyt/f31d3215dfd4916f2779a08bfa924a9a to your computer and use it in GitHub Desktop.
Save ymgyt/f31d3215dfd4916f2779a08bfa924a9a to your computer and use it in GitHub Desktop.
coloring console output example
package main
import "fmt"
var colorRed = string([]byte{27, 91, 57, 55, 59, 51, 49, 59, 49, 109})
var colorReset = string([]byte{27, 91, 48, 109})
func main() {
fmt.Printf("%s messag%s normal\n", colorRed, colorReset)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment