Gotabulate

Gotabulate -- 使用 Go 轻松地打印你的表格数据。「Gotabulate - Easily pretty-print your tabular data with Go」

  • 所有者: bndr/gotabulate
  • 平台: Linux, Mac, Windows
  • 许可证: Apache License 2.0
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

Gotabulate - Easily pretty-print tabular data

GoDoc
Build Status

Summary

Go-Tabulate - Generic Go Library for easy pretty-printing of tabular data.

Installation

go get github.com/bndr/gotabulate

Description

Supported data types:

  • 2D Array of Int, Int64, Float64, String, interface{}
  • Map of String, interface{} (Keys will be used as header)

Usage

// Create Some Fake Rows
row_1 := []interface{}{"john", 20, "ready"}
row_2 := []interface{}{"bndr", 23, "ready"}

// Create an object from 2D interface array
t := gotabulate.Create([][]interface{}{row_1, row_2})

// Set the Headers (optional)
t.SetHeaders([]string{"age", "status"})

// Set the Empty String (optional)
t.SetEmptyString("None")

// Set Align (Optional)
t.SetAlign("right")

// Print the result: grid, or simple
fmt.Println(t.Render("grid"))

+---------+--------+-----------+

主要指标

概览
名称与所有者bndr/gotabulate
主编程语言Go
编程语言Go (语言数: 1)
平台Linux, Mac, Windows
许可证Apache License 2.0
所有者活动
创建于2014-08-21 07:44:28
推送于2021-02-09 14:02:15
最后一次提交2021-02-09 15:02:14
发布数3
最新版本名称v1.1.2 (发布于 2014-09-20 15:15:23)
第一版名称v1.0 (发布于 2014-09-19 15:25:14)
用户参与
星数334
关注者数9
派生数32
提交数46
已启用问题?
问题数9
打开的问题数5
拉请求数8
打开的拉请求数0
关闭的拉请求数0
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?