term

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 12 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Blue

func Blue(t ...string) string

func Bluef

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

func Bold

func Bold(t ...string) string

func Boldf

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

func Cyan

func Cyan(t ...string) string

func Cyanf

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

func FailureIcon

func FailureIcon() string

func Green

func Green(t ...string) string

func Greenf

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

func Grey

func Grey(t ...string) string

func Greyf

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

func Italic(t ...string) string

func Italicf

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

func Magenta

func Magenta(t ...string) string

func Magentaf

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

func OpenBrowser

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

OpenBrowser opens a web browser at the specified url.

func Red

func Red(t ...string) string

func Redf

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

func SuccessIcon

func SuccessIcon() string

func WarningIcon

func WarningIcon() string

func Yellow

func Yellow(t ...string) string

func Yellowf

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

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

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

type Pager

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

func NewPager

func NewPager() *Pager

func (*Pager) Get

func (s *Pager) Get() string

func (*Pager) Set

func (s *Pager) Set(cmd string)

func (*Pager) Start

func (s *Pager) Start() error

func (*Pager) Stop

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