common

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorRed     = "red"
	ColorGreen   = "green"
	ColorYellow  = "yellow"
	ColorBlue    = "blue"
	ColorMagenta = "magenta"
	ColorCyan    = "cyan"
	ColorWhite   = "white"
)

Variables

This section is empty.

Functions

func CheckAndExit

func CheckAndExit(err error)

func CheckErr

func CheckErr(err error) bool

func ColorFuncTemplate

func ColorFuncTemplate(tpl string) (*template.Template, error)

func Converted2Rendered

func Converted2Rendered(r io.Reader, w io.Writer, prefix string)

func Exit

func Exit(message string, code int)

func ParseCommand

func ParseCommand(cmd string) (string, []string)

func PrintErr

func PrintErr(err error)

func PrintErrWithPrefix

func PrintErrWithPrefix(prefix string, err error)

func RenderedOutput

func RenderedOutput(wr io.Writer, line ColorLine) error

func RenderedTpl

func RenderedTpl() *template.Template

func Tmux

func Tmux() bool

func TmuxAutomaticRename

func TmuxAutomaticRename() bool

func TmuxSetAutomaticRename

func TmuxSetAutomaticRename(index string, autoRename bool)

func TmuxSetWindowName

func TmuxSetWindowName(index, name string)

func TmuxWindowInfo

func TmuxWindowInfo() (index, name string)

Types

type ColorLine

type ColorLine struct {
	Prefix string
	Value  string
}

Jump to

Keyboard shortcuts

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