Table of contents
Since i like to always reinvent the wheel, heres the 1000th wrapper library around ANSI escape sequences for Go.
Add this package to your project
$ go get github.com/LordOfTrident/ansi-go
And import it
package main
import "github.com/LordOfTrident/ansi-go"
func main() {
style := ansi.Bold + ansi.LightMagenta
ansi.Println(ansi.ClearScreen, ansi.Goto(1, 1), style, "Hello, world!")
}
$ cd example
$ go build
$ ./example
This library is very small and the code itself is pretty much documentation. Just look around the source files.
If you find any bugs, please, create an issue and report them.