table

package
v0.0.0-...-2810845 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2021 License: LGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Justify

type Justify int8

Justify is a number flag

const (
	// Left Align
	Left Justify = iota
	// Right Align
	Right
	// Center Align
	Center
)

func (*Justify) Compute

func (ji *Justify) Compute(left, right bool)

Compute Justify flag from left and right booleans

func (Justify) String

func (ji Justify) String() string

type Table

type Table struct {
	Headers   []string
	Alignment []Justify
	Rows      [][]string
	Width     []int
}

Table is a structured data representation of a markdown table

func Parse

func Parse(in string) (tbl Table)

Parse turns a markdown table string into structured data

Jump to

Keyboard shortcuts

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