Documentation ¶
Index ¶
- type Executable
- type Fifo
- type ShellScript
- func (s *ShellScript) Present() bool
- func (s *ShellScript) Run() (string, error)
- func (s *ShellScript) RunCheckSuccess(args ...string) (bool, error)
- func (s *ShellScript) RunWithArgs(args ...string) (string, error)
- func (s *ShellScript) String() string
- func (s *ShellScript) UnmarshalText(text []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executable ¶
func New ¶
func New(line string) (Executable, error)
type ShellScript ¶
type ShellScript struct {
Executable string
}
ShellScript might be either:
- the path to an executable
- an executable in path
- a shell command with its argument
func (*ShellScript) Present ¶
func (s *ShellScript) Present() bool
Present indicates if the value has been filled in into the config
func (*ShellScript) Run ¶
func (s *ShellScript) Run() (string, error)
Run tries to execute the command, first looking for a corresponding executable and invoking it, then invoking the string as a command followed by its parameters.
func (*ShellScript) RunCheckSuccess ¶
func (s *ShellScript) RunCheckSuccess(args ...string) (bool, error)
RunCheckSuccess executes the script with the given arguments and returns true if execution has been successful, false otherwise.
func (*ShellScript) RunWithArgs ¶
func (s *ShellScript) RunWithArgs(args ...string) (string, error)
RunWithArgs executes the script using the provided strings as parameters.
func (*ShellScript) String ¶
func (s *ShellScript) String() string
func (*ShellScript) UnmarshalText ¶
func (s *ShellScript) UnmarshalText(text []byte) error
Click to show internal directories.
Click to hide internal directories.