1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
# ansi
[](https://github.com/muesli/ansi/releases)
[](https://github.com/muesli/ansi/actions)
[](https://coveralls.io/github/muesli/ansi?branch=master)
[](https://goreportcard.com/report/muesli/ansi)
[](https://pkg.go.dev/github.com/muesli/ansi)
Raw ANSI sequence helpers
## ANSI Writer
```go
import "github.com/muesli/ansi"
w := ansi.Writer{Forward: os.Stdout}
w.Write([]byte("\x1b[31mHello, world!\x1b[0m"))
w.Close()
```
## Compressor
The ANSI compressor eliminates unnecessary/redundant ANSI sequences.
```go
import "github.com/muesli/ansi/compressor"
w := compressor.Writer{Forward: os.Stdout}
w.Write([]byte("\x1b[31mHello, world!\x1b[0m"))
w.Close()
```
|