cli

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package table produces a string that represents slice of structs data in a text table

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintDict

func PrintDict(u interface{}, keys KeyList, fmts FormatterList)

func PrintList

func PrintList(slice interface{}, keys KeyList, fmts FormatterList)

Output formats slice of structs data and writes to standard output.(Using box drawing characters)

func Run

func Run() error

Run method indicates how to start a cli tool through cobra.

func TableDict

func TableDict(u interface{}, keys KeyList, fmts FormatterList) string

Table formats slice of structs data and returns the resulting string.(Using standard ascii characters)

func TableList

func TableList(slice interface{}, keys KeyList, fmts FormatterList) string

Table formats slice of structs data and returns the resulting string.(Using box drawing characters)

Types

type FormatterList

type FormatterList map[string]func(v interface{}) string

type KeyList

type KeyList []string

type StructElemCb

type StructElemCb func(name string, value reflect.Value) error

Jump to

Keyboard shortcuts

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