仲天
首页
(current)
分类
Go
Python
自动化脚本
xTS(谷歌认证测试)
Selenium
软件测试
Redis
Mysql
Docker
MongoDB
Jquery
Nginx
Bootstrap
Linux
正则表达式
bat
cmd批处理
截图
作者分享
JSON
SEO
在线工具
搜索
推荐一个,Go输出彩色命令行,第三方库
2022-07-20 14:24:44
407
本文章为原创文章,转载请附上原文地址,谢谢。
# color Output colored command line. 输出彩色命令行 [源码地址github](https://github.com/zztroot/color) # 安装 ```cmd go get github.com/zztroot/color ``` 或者使用go mod tidy # 列子 ```go package main import ( "fmt" "github.com/zztroot/color" ) func main() { fmt.Println(color.Coat("我是绿色", color.Green)) fmt.Println(color.CoatMany("我是红色加下划线", color.Red, color.Underline)) // 在需要输入的字符串前面加上标识符,如:<c?red?> 红色 fmt.Println(color.CoatFormat("<c?red?>我是红色<c?yellow?>我是黄色 <c?green?> <c?Underline?> 我 是绿色加下划线")) name := "zhongtian" fmt.Println(color.Coat(fmt.Sprintf("%s:我是蓝色的", name), color.Blue)) } ``` # 输出 
版权声明:本文为仲天原创文章,转载请附上原文出处链接和本声明。
本文链接:
文章分类
Go
Python
自动化脚本
xTS(谷歌认证测试)
Selenium
软件测试
Redis
Mysql
Docker
MongoDB
Jquery
Nginx
Bootstrap
Linux
正则表达式
bat
cmd批处理
截图
作者分享
JSON
SEO
推荐文章
2023年网站真的不挣钱了,千万别在个人网站投入太多时间和精力...
271
推荐一个,Go输出彩色命令行,第三方库
407
uiautomator2+adb shell input tap 实现微博自动取消关注
460
搜索引擎提交入口大全,站长平台地址大全
154
python实现ecshop开源商城登陆自动化测试
316
优选网站
在线JSON工具
在线音频提取
Linux在线大全
PDF转WORD
TCP/IP端口大全