mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-07 22:20:24 +00:00
25 lines
574 B
Markdown
25 lines
574 B
Markdown
## Terminal ##
|
|
Terminal is a simple golang package that provides basic terminal handling.
|
|
|
|
Terminal wraps color/format functions provided by [ANSI escape code](http://en.wikipedia.org/wiki/ANSI_escape_code)
|
|
|
|
## Usage ##
|
|
```go
|
|
package main
|
|
|
|
import (
|
|
"github.com/wsxiaoys/terminal"
|
|
"github.com/wsxiaoys/terminal/color"
|
|
)
|
|
|
|
func main() {
|
|
terminal.Stdout.Color("y").
|
|
Print("Hello world").Nl().
|
|
Reset().
|
|
Colorf("@{kW}Hello world\n")
|
|
|
|
color.Print("@rHello world")
|
|
}
|
|
```
|
|
Check the [godoc result](https://godoc.org/github.com/wsxiaoys/terminal) for more details.
|