fmttable

package module
v0.0.0-...-631df79 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

README

go-fmttable

test codecov Go Report Card

Installation

$ go get -u github.com/entooone/go-ftable/cmd/goft

Usage

$ cat << EOF | goft
| abc | def | hjk |
| hello | world | gopher|
EOF

Output

| abc   | def   | hjk    |
| hello | world | gopher |

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Table

type Table [][]string

Table represents a table of strings in two dimensions

func ReadTableMD

func ReadTableMD(r io.Reader) (Table, error)

ReadTableMD loads Table from a Markdown table

func (Table) Equal

func (t Table) Equal(td Table) bool

Equal reports whether x and y are equal

func (Table) WriteCSVFormat

func (t Table) WriteCSVFormat(w io.Writer)

WriteCSVFormat writes the CSV table to w

func (Table) WriteMDFormat

func (t Table) WriteMDFormat(w io.Writer)

WriteMDFormat writes the Markdown table to w

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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