Documentation
¶
Index ¶
- Variables
- func Run(o Object) error
- func RunSilent(o Object) error
- type Condition
- type Const
- type List
- type Object
- func DownloadFile(url string, path string) Object
- func EnsureSymlink(source string, destination string) Object
- func EnsureText(path string, text string, rg *regexp.Regexp) Object
- func Err(err error) Object
- func Execute(cmd *exec.Cmd, args ...string) Object
- func Nop() Object
- func Scope(fn func() Object) Object
- func ShellCommand(args ...string) Object
- type Optional
- type SimpleAction
- type SimpleActionBuilder
- type SimpleCondition
- type SimpleConditionBuilder
- type WithCondition
Constants ¶
This section is empty.
Variables ¶
View Source
var CommandExists = SimpleConditionBuilder[string]{ CreateCondition: func(arg string) func() (bool, error) { return func() (bool, error) { return exec.CommandExists(arg), nil } }, String: func(s string) string { return fmt.Sprintf("CommandExists(%s)", s) }, }.Init()
View Source
var Func = SimpleActionBuilder[func() error]{ CreateRun: func(fn func() error) func() error { return func() error { return fn() } }, }.Init()
View Source
var FuncCond = SimpleConditionBuilder[func() (bool, error)]{ CreateCondition: func(fn func() (bool, error)) func() (bool, error) { return func() (bool, error) { return fn() } }, }.Init()
Functions ¶
Types ¶
type Object ¶
type Object interface {
// contains filtered or unexported methods
}
func DownloadFile ¶
func EnsureSymlink ¶
func ShellCommand ¶
type SimpleAction ¶
type SimpleAction struct {
// contains filtered or unexported fields
}
type SimpleActionBuilder ¶
func (SimpleActionBuilder[T]) Init ¶
func (s SimpleActionBuilder[T]) Init() func(T) Object
type SimpleCondition ¶
type SimpleCondition struct {
// contains filtered or unexported fields
}
type SimpleConditionBuilder ¶
type SimpleConditionBuilder[T any] struct { String func(T) string CreateCondition func(T) func() (bool, error) }
func (SimpleConditionBuilder[T]) Init ¶
func (s SimpleConditionBuilder[T]) Init() func(T) Condition
type WithCondition ¶
Click to show internal directories.
Click to hide internal directories.