commandbuilder

package
v0.0.0-...-08308cb Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ArgTypeRaw        = 1
	ArgTypeShortParam = 2
	ArgTypeLongParam  = 3
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Arg

type Arg struct {
	Type  uint
	Name  string
	Value string

	ValueSecret bool
}

func (Arg) SafeString

func (a Arg) SafeString() string

func (Arg) SafeValue

func (a Arg) SafeValue() string

func (Arg) UnsafeParts

func (a Arg) UnsafeParts() []string

type CommandBuilder

type CommandBuilder struct {
	Name  string
	Parts []Arg
}

func (*CommandBuilder) Add

func (cb *CommandBuilder) Add(args ...Arg)

func (*CommandBuilder) Command

func (cb *CommandBuilder) Command() *exec.Cmd

func (*CommandBuilder) Run

func (cb *CommandBuilder) Run() error

func (*CommandBuilder) SafeString

func (cb *CommandBuilder) SafeString() string

Jump to

Keyboard shortcuts

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