Documentation ¶
Index ¶
- func Chdir(dir string) (func() error, error)
- func CheckErr(err error, msg ...string)
- func CommandIsExist(cmd string) bool
- func Green(format string, a ...any)
- func MustChdir(dir string) func()
- func MustRun(format string, a ...any)
- func MustSHRun(format string, a ...any)
- func Normal(format string, a ...any)
- func Recover(r any)
- func Red(format string, a ...any)
- func Run(format string, a ...any) error
- func RunCombinedOutput(cmd string, envs []string) (string, error)
- func SHRun(format string, a ...any) error
- func Set(s ISet)
- func Throw(format string, a ...any)
- func ToCommand(cmd string) *exec.Cmd
- func WrapCli(cli ICli)
- func WrapCobra(cobra ICobra)
- func Yellow(format string, a ...any)
- type CMD
- type DefaultPrint
- type DefaultSet
- type Err
- type ICli
- type ICobra
- type IPrint
- type ISet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommandIsExist ¶
func RunCombinedOutput ¶
RunCombinedOutput ...
Types ¶
type CMD ¶ added in v0.1.1
type CMD struct {
// contains filtered or unexported fields
}
CMD wrap origin cmd structure
type DefaultPrint ¶ added in v0.1.1
type DefaultPrint struct{}
DefaultPrint ...
func (*DefaultPrint) Green ¶ added in v0.1.1
func (d *DefaultPrint) Green(format string, a ...any)
Green ...
func (*DefaultPrint) Normal ¶ added in v0.1.1
func (d *DefaultPrint) Normal(format string, a ...any)
Normal ...
func (*DefaultPrint) Red ¶ added in v0.1.1
func (d *DefaultPrint) Red(format string, a ...any)
Red ...
func (*DefaultPrint) Yellow ¶ added in v0.1.1
func (d *DefaultPrint) Yellow(format string, a ...any)
Yellow ...
type DefaultSet ¶ added in v0.1.1
type DefaultSet struct {
IPrint
}
DefaultSet ...
func (*DefaultSet) CheckErr ¶ added in v0.1.1
func (d *DefaultSet) CheckErr(err error, msg ...string)
CheckErr ...
func (*DefaultSet) Recover ¶ added in v0.1.1
func (d *DefaultSet) Recover(r interface{})
Recover ...
func (*DefaultSet) Throw ¶ added in v0.1.1
func (d *DefaultSet) Throw(format string, a ...any)
Throw ...
Click to show internal directories.
Click to hide internal directories.