Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ago

func Ago(m *time.Time, now time.Time) string

func Check

func Check(selected bool) string

func Date

func Date(t *time.Time) string

func Duration

func Duration(d time.Duration) string

    Duration returns a readable representation of the provided time

    func Number

    func Number(v interface{}) string

    func OnOff

    func OnOff(on bool) string

    func PaginationFooter

    func PaginationFooter(list model.ResourceList) string

    func TimeSince

    func TimeSince(m time.Time, now time.Time) string

      TimeSince to calculate age of resources

      Types

      type Printer

      type Printer interface {
      	Print(Table, io.Writer) error
      }

      func NewPrinter

      func NewPrinter() Printer

      type Table

      type Table struct {
      	Headers []string
      	NextRow func() []string
      	Footer  string
      }

      type TableWriter

      type TableWriter interface {
      	Headers(...string) error
      	Row(...string) error
      	Footer(string) error
      	Flush() error
      }

      func NewWriter

      func NewWriter(output io.Writer) TableWriter