mago

package module
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Info           *log.Logger
	Warning        *log.Logger
	Error          *log.Logger
	InfoLogWriter  LogWriter
	ErrorLogWriter LogWriter
)

Functions

func CmdSync

func CmdSync(name string, arg ...string) (ok bool)

func CmdSyncCd

func CmdSyncCd(directory string, name string, arg ...string) (ok bool)

func MaybeInstallProgram

func MaybeInstallProgram(name string, installCmd Runnable) (ok bool)

func SearchProgram

func SearchProgram(name string) (programPath string, ok bool)

func Watch added in v0.4.0

func Watch(patterns, ignoredPatterns []string, name string, args ...string)

func WatchFiles added in v0.3.0

func WatchFiles(patterns []string, ignoredPatterns []string) bool

func YesOrNoPrompt

func YesOrNoPrompt(text string) bool

Types

type Cmd

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

func CmdAsync

func CmdAsync(name string, arg ...string) (cmd Cmd, ok bool)

func NewCmd

func NewCmd(name string, arg ...string) Cmd

func (Cmd) Kill added in v0.4.9

func (c Cmd) Kill() (ok bool)

func (Cmd) Process

func (c Cmd) Process() *os.Process

func (Cmd) Run

func (c Cmd) Run() (ok bool)

func (Cmd) SetDirectory

func (c Cmd) SetDirectory(directory string)

func (Cmd) SetStderr

func (c Cmd) SetStderr(stderr io.Writer)

func (Cmd) SetStdin

func (c Cmd) SetStdin(stdin io.Reader)

func (Cmd) SetStdout

func (c Cmd) SetStdout(stdout io.Writer)

func (Cmd) Start

func (c Cmd) Start() (ok bool)

func (Cmd) String

func (c Cmd) String() string

func (Cmd) Wait

func (c Cmd) Wait() error

type LogWriter

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

func (LogWriter) Write

func (lw LogWriter) Write(p []byte) (n int, err error)

type PipedCmds

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

func NewPipedCmds

func NewPipedCmds(cmds ...Cmd) PipedCmds

func (PipedCmds) Run

func (p PipedCmds) Run() (ok bool)

func (PipedCmds) String

func (p PipedCmds) String() string

type Runnable

type Runnable interface {
	Run() bool
}

Jump to

Keyboard shortcuts

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