term

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blue added in v0.2.0

func Blue(t ...string) string

func Bluef added in v0.2.0

func Bluef(t string, args ...interface{}) string

func Bold added in v0.2.0

func Bold(t ...string) string

func Boldf added in v0.2.0

func Boldf(t string, args ...interface{}) string

func Cyan added in v0.2.0

func Cyan(t ...string) string

func Cyanf added in v0.2.0

func Cyanf(t string, args ...interface{}) string

func FailureIcon added in v0.2.0

func FailureIcon() string

func Green added in v0.2.0

func Green(t ...string) string

func Greenf added in v0.2.0

func Greenf(t string, args ...interface{}) string

func Grey added in v0.2.0

func Grey(t ...string) string

func Greyf added in v0.2.0

func Greyf(t string, args ...interface{}) string

func HasHomebrew

func HasHomebrew() bool

HasHomebrew check whether the user has installed brew

func IsCI

func IsCI() bool

func IsColorDisabled

func IsColorDisabled() bool

func IsTTY

func IsTTY() bool

func IsUnderHomebrew

func IsUnderHomebrew(binpath string) bool

IsUnderHomebrew checks whether the given binary is under the homebrew path.

func Italic added in v0.2.0

func Italic(t ...string) string

func Italicf added in v0.2.0

func Italicf(t string, args ...interface{}) string

func Magenta added in v0.2.0

func Magenta(t ...string) string

func Magentaf added in v0.2.0

func Magentaf(t string, args ...interface{}) string

func OpenBrowser added in v0.2.0

func OpenBrowser(goos, url string) *exec.Cmd

OpenBrowser opens a web browser at the specified url.

func Red added in v0.2.0

func Red(t ...string) string

func Redf added in v0.2.0

func Redf(t string, args ...interface{}) string

func SuccessIcon added in v0.2.0

func SuccessIcon() string

func WarningIcon added in v0.2.0

func WarningIcon() string

func Yellow added in v0.2.0

func Yellow(t ...string) string

func Yellowf added in v0.2.0

func Yellowf(t string, args ...interface{}) string

Types

type ColorScheme

type ColorScheme struct {
	// contains filtered or unexported fields
}

ColorScheme is a color scheme.

func NewColorScheme

func NewColorScheme() *ColorScheme

NewColorScheme returns a new ColorScheme with the given theme.

type ErrClosedPagerPipe added in v0.2.0

type ErrClosedPagerPipe struct {
	// contains filtered or unexported fields
}

ErrClosedPagerPipe is the error returned when writing to a pager that has been closed.

type Pager added in v0.2.0

type Pager struct {
	Out    io.Writer
	ErrOut io.Writer
	// contains filtered or unexported fields
}

func NewPager added in v0.2.0

func NewPager() *Pager

func (*Pager) Get added in v0.2.0

func (s *Pager) Get() string

func (*Pager) Set added in v0.2.0

func (s *Pager) Set(cmd string)

func (*Pager) Start added in v0.2.0

func (s *Pager) Start() error

func (*Pager) Stop added in v0.2.0

func (s *Pager) Stop()

type Theme

type Theme struct {
	ColorGreen   termenv.Color
	ColorYellow  termenv.Color
	ColorCyan    termenv.Color
	ColorRed     termenv.Color
	ColorGrey    termenv.Color
	ColorBlue    termenv.Color
	ColorMagenta termenv.Color
}

Theme represents a color theme.

Jump to

Keyboard shortcuts

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