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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?