File: README.md

package info (click to toggle)
golang-github-wsxiaoys-terminal 0.0~git20160513.0.0940f3f-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, buster-backports
  • size: 80 kB
  • ctags: 36
  • sloc: makefile: 5
file content (24 lines) | stat: -rw-r--r-- 574 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## 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.