go-cliview:在不同的CLI视图中打印Go对象

时间:2021-05-20 11:07:19
【文件属性】:
文件名称:go-cliview:在不同的CLI视图中打印Go对象
文件大小:10KB
文件格式:ZIP
更新时间:2021-05-20 11:07:19
Go CLI视图 通过可自定义的格式和样式支持,在树形视图或表视图中打印复杂的数据对象。 用法 import ( cv "github.com/easeway/go-cliview" ) func ShowTable ( data [] interface {}) { cv. Table { Columns : []cv. Column { cv. Column { Title : "ID" , Field : "id" , Width : 16 }, cv. Column { Title : "Name" , Field : "name" , MaxWidth : 20 }, cv. Column { Title : "Age" , Field : "age" , MaxWidth : 3 , Align : cv . AlignRight }, cv. Co
【文件预览】:
go-cliview-master
----.travis.yml(41B)
----table.go(7KB)
----output.go(1KB)
----LICENSE(1KB)
----table_test.go(6KB)
----tree.go(5KB)
----tree_test.go(7KB)
----README.md(4KB)

网友评论