table

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package table provides a table like formatting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Presenter

type Presenter struct{}

Presenter is a presenter that formats v with table layout.

func NewPresenter

func NewPresenter() *Presenter

func (*Presenter) Format

func (p *Presenter) Format(v interface{}, indent string) (string, error)

Format formats v with table layout. v should be a struct type that has a slice field. Format extract the slice field and display them. See test cases for example. TODO: remove indent.

Jump to

Keyboard shortcuts

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