SGR (Select Graphic Rendition) is a simple Go package containing a large block of constants that attempts to implement every SGR ANSI escape code listed here.
Hate how other ANSI packages use functions and structs that you have to convert 20 times to get something you can print? This package is ONLY constants meaning you can have an RGB underline on text that is fast blinking with Fraktur font all inside of one constant.
package main
import (
"fmt"
"github.com/notwithering/sgr"
)
const woah string = sgr.Italic +
sgr.BgColorRGB + "255;0;85" + sgr.M +
sgr.Underline +
sgr.Overline +
sgr.Faint +
"wow this is so cool!" +
sgr.Reset
func main() {
fmt.Println(woah)
}
Copyright (c) 2024 Jim Philip