aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorFatih Arslan <ftharsln@gmail.com>2014-02-18 10:52:23 +0000
committerFatih Arslan <ftharsln@gmail.com>2014-02-18 10:52:23 +0000
commitc297f2223f094d003de912e2b9efe6b843d4ad77 (patch)
treeb2f685ff0ad908378a80083e426e6d6b205e4de1 /README.md
parente653ecf96db821ff7c2dc9ff5532cfcd92a0ccfc (diff)
downloadcolour-c297f2223f094d003de912e2b9efe6b843d4ad77.tar.gz
colour-c297f2223f094d003de912e2b9efe6b843d4ad77.tar.bz2
Add PrintFunc.. functions and update readme.md
Diffstat (limited to 'README.md')
-rw-r--r--README.md18
1 files changed, 16 insertions, 2 deletions
diff --git a/README.md b/README.md
index f872bf6..6db05af 100644
--- a/README.md
+++ b/README.md
@@ -4,6 +4,7 @@ Color let you use colorized outputs in terms of [ANSI Escape
Codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors). The API can be
used in several way, pick one one that suits you.
+The package is under ongoing development, checkout for regular updates.
## Install
@@ -51,6 +52,19 @@ whiteBackground := red.Add(color.BgWhite)
whiteBackground.Println("Red text with White background.")
```
+### Custom print functions
+
+```go
+// Create a custom print function for convenient
+red := color.New(color.FgRed).PrintfFunc()
+red("warning")
+red("error: %s", err)
+
+// Mix up multiple attributes
+notice := color.New(color.Bold, color.FgGreen).PrintlnFunc()
+notice("don't forget this...")
+```
+
### Plug into existing code
```go
@@ -71,8 +85,8 @@ fmt.Println("All text will be now bold magenta.")
## Todo
-* Add partial coloring of lines.
-* Save/Return previous values
+* Save/Return previous values
+* Implement SprintXxx functions()
## Credits