cli

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2016 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvalPrintUsage

func EvalPrintUsage(usage_func func() error, args []string, minlen int) bool

func FlushWriter

func FlushWriter(w *tabwriter.Writer)

func FormatDate

func FormatDate(date string) string

func NameValueSliceToMap

func NameValueSliceToMap(params []string) map[string]string

func NewTabWriter

func NewTabWriter(output io.Writer) *tabwriter.Writer

func Output

func Output(f Formatter, err error)

func Register

func Register(w *CLIWriter)

Types

type CLIWriter

type CLIWriter struct {
	FormatWriter func(f Formatter)
	ErrorWriter  func(err error)
}

Handles writing the formatted type into the desired output and global formatting

type Formatter

type Formatter interface {
	ToColumns(output io.Writer) error
}

Specializes in formatting a type into Column format

Jump to

Keyboard shortcuts

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