File: README.md

package info (click to toggle)
golang-github-daviddengcn-go-colortext 0.0~git20150719.0.3b18c85-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, sid, trixie
  • size: 80 kB
  • sloc: makefile: 2
file content (21 lines) | stat: -rw-r--r-- 740 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
go-colortext package [![GoSearch](http://go-search.org/badge?id=github.com%2Fdaviddengcn%2Fgo-colortext)](http://go-search.org/view?id=github.com%2Fdaviddengcn%2Fgo-colortext)
====================

This is a package to change the color of the text and background in the console, working both under Windows and other systems.

Under Windows, the console APIs are used. Otherwise, ANSI texts are output.

Docs: http://godoc.org/github.com/daviddengcn/go-colortext ([packages that import ct](http://go-search.org/view?id=github.com%2fdaviddengcn%2fgo-colortext))

Usage:
```go
Foreground(Green, false)
fmt.Println("Green text starts here...")
ChangeColor(Red, true, White, false)
fmt.Println(...)
ResetColor()
```

LICENSE
=======
BSD license