table

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2021 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

终端表格渲染

list := [][]int{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}
table.NewTable(list).Render()

Index

Constants

View Source
const (
	Solid  = iota // 实线
	Dashed        // 虚线(类 mysql 终端表格)
	Dotted        // 点线
)

边界样式枚举

Variables

This section is empty.

Functions

This section is empty.

Types

type Table added in v0.0.2

type Table interface {
	Style(int) Table       // 设置边界样式
	Border(bool) Table     // 设置是否显示内容区下边界
	Header([]string) Table // 设置表格头部数据
	Content() string       // 返回渲染后文本内容
	Render()               // 输出渲染后文本内容
}

func NewTable added in v0.0.2

func NewTable(elem interface{}) Table

NewTable ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL