table

package
v0.10.11 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 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{}) (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.

Jump to

Keyboard shortcuts

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