command

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

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

func New

func New(arguments ...string) *Command

func NewSudoCommand

func NewSudoCommand(sudoPassword string, arguments ...string) *Command

func NewWslCommand

func NewWslCommand(distribution string, arguments ...string) *Command

func NewWslSudoCommand

func NewWslSudoCommand(distribution string, arguments ...string) *Command

func (*Command) AddArguments

func (p *Command) AddArguments(arguments ...string) *Command

func (*Command) AddPreArguments

func (p *Command) AddPreArguments(arguments ...string) *Command

func (*Command) Output

func (p *Command) Output() (out string, err error)

func (*Command) Run

func (p *Command) Run() (err error)

func (*Command) SetNormalArguments

func (p *Command) SetNormalArguments(indexes ...int) *Command

func (*Command) SetNormalPreArguments

func (p *Command) SetNormalPreArguments(indexes ...int) *Command

func (*Command) SetSecretArguments

func (p *Command) SetSecretArguments(indexes ...int) *Command

func (*Command) SetSecretPreArguments

func (p *Command) SetSecretPreArguments(indexes ...int) *Command

func (*Command) String

func (p *Command) String() string

func (*Command) StringWithSecret

func (p *Command) StringWithSecret() string

type DefaultFactory

type DefaultFactory struct {
}

func NewFactory

func NewFactory() *DefaultFactory

func (*DefaultFactory) NewCommand

func (f *DefaultFactory) NewCommand(arguments ...string) *Command

func (*DefaultFactory) NewSudoCommand

func (f *DefaultFactory) NewSudoCommand(sudoPassword string, arguments ...string) *Command

type Factory

type Factory interface {
	NewCommand(arguments ...string) *Command
	NewSudoCommand(sudoPassword string, arguments ...string) *Command
}

type WslFactory

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

func NewWslFactory

func NewWslFactory(distribution string) *WslFactory

func (*WslFactory) NewCommand

func (w *WslFactory) NewCommand(arguments ...string) *Command

func (*WslFactory) NewSudoCommand

func (w *WslFactory) NewSudoCommand(sudoPassword string, arguments ...string) *Command

Jump to

Keyboard shortcuts

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