ui

package
v0.6.4-beta003 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2021 License: MIT Imports: 7 Imported by: 30

Documentation

Overview

simple ui - TODO use something more sophisticated :)

Index

Constants

View Source
const IconError = "💔"

IconError emoji

View Source
const IconMedal = "🥇"

IconMedal emoji

Variables

View Source
var Verbose = false

Verbose adds additional info messages e.g. in case of checking errors

Functions

func CommandOutput

func CommandOutput(output []byte, command string, params ...string)

func Completed

func Completed(main string, sub ...string)

func Err

func Err(err error)

func Errf

func Errf(err string, params ...interface{})

func ExitOnError

func ExitOnError(item string, errors ...error)

func Fail

func Fail(err error)

func Failf

func Failf(err string, params ...interface{})

func GroupCompleted

func GroupCompleted(main string, sub ...string)

func Info

func Info(message string, subMessages ...string)

func InfoGrid

func InfoGrid(table map[string]string)

func JSONTable

func JSONTable(tableData TableData, writer io.Writer) error
func Logo()

func LogoNoColor

func LogoNoColor()

func Medal

func Medal()

func NL

func NL()

func PrintOnError

func PrintOnError(item string, errors ...error)

func ShellCommand

func ShellCommand(title string, commands ...string)

Warn shows warning in terminal

func Success

func Success(message string, subMessages ...string)

Warn shows warning in terminal

func Table

func Table(tableData TableData, writer io.Writer)

func Vector

func Vector(table []string)

func Warn

func Warn(message string, subMessages ...string)

Warn shows warning in terminal

func WarnOnError

func WarnOnError(item string, errors ...error)

Types

type ArrayTable

type ArrayTable [][]string

func NewArrayTable

func NewArrayTable(a [][]string) ArrayTable

func (ArrayTable) Table

func (a ArrayTable) Table() (header []string, data [][]string)

type TableData

type TableData interface {
	Table() (header []string, data [][]string)
}

Jump to

Keyboard shortcuts

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