xtable

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: MIT Imports: 3 Imported by: 4

Documentation

Overview

Package xtable 终端表格渲染

list := [][]int{{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}
xtable.New(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

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

Table ...

func New

func New(elem interface{}) Table

New ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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