Color Print(cp) is ANSI coloured text to the standard output by Golang
================================
Documentation
---
Website on [Github](http://godoc.org/github.com/Kenshin/cprint) |
Visit the docs on [GoDoc](http://godoc.org/github.com/Kenshin/cprint)
Importing
---
`go get github.com/Kenshin/cprint`
Example
---
import . "github.com/Kenshin/cprint"
// test ont
P(WARING, "Remote latest version %v %v latest version %v.\n", "0.10.28", "=", "0.1.0.26")
// test tow
cp := CP{Red, false, None, false, "="}
P(NOTICE, "Remote latest version %v %v latest version %v, don't need to upgrade.\n", "0.10.28", cp, "0.1.0.26")
// test three
err := errors.New("Variable is not defined.")
Error(ERROR, "'gnvm updte latest' an error has occurred. \nError: ", err)
Screenshots
--
![color print](http://i.imgur.com/OjFVyKI.png)
Help
---
* Email <kenshin@ksria.com>
* Github issue
CHANGELOG
---
* **2014-05-28, Version `0.0.1` support:**
* `CP` *struct*
* `P` *method*
* `Error` *method*
LICENSE
---
(The MIT License)
Copyright (c) 2014 Kenshin Wang <kenshin@ksria.com>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传