types

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd added in v2.1.0

type Cmd struct {
	*execabs.Cmd
	Private     bool
	Trace       *bool
	TraceWriter io.Writer
}

Cmd represents a command to be executed. It extends the execabs.Cmd struct and adds fields for controlling the command's execution, such as whether it should be executed in private mode (with output discarded) and whether its execution should be traced.

func (*Cmd) Run added in v2.2.0

func (c *Cmd) Run() error

Run executes the command and waits for it to complete. If the Trace field is nil, it is set to true. The Env, Stdout, and Stderr fields are set to their default values if they are nil. If the Private field is true, the Stdout field is set to io.Discard. If the Trace field is true, the command line is printed to Stdout.

func (*Cmd) SetTrace added in v2.2.0

func (c *Cmd) SetTrace(trace bool)

SetTrace sets the Trace field of the Cmd to the provided boolean value.

type DeepStringMapFlag

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

func (*DeepStringMapFlag) Get

func (d *DeepStringMapFlag) Get() map[string]map[string]string

func (*DeepStringMapFlag) Set

func (d *DeepStringMapFlag) Set(value string) error

func (*DeepStringMapFlag) String

func (d *DeepStringMapFlag) String() string

type MapFlag

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

func (*MapFlag) Get

func (m *MapFlag) Get() map[string]string

func (*MapFlag) Set

func (m *MapFlag) Set(value string) error

func (*MapFlag) String

func (m *MapFlag) String() string

type StringMapFlag

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

func (*StringMapFlag) Get

func (s *StringMapFlag) Get() map[string]string

func (*StringMapFlag) Set

func (s *StringMapFlag) Set(value string) error

func (*StringMapFlag) String

func (s *StringMapFlag) String() string

type StringSliceFlag

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

StringSliceFlag is a flag type which support comma separated values and escaping to not split at unwanted lines.

func (*StringSliceFlag) Get

func (s *StringSliceFlag) Get() []string

func (*StringSliceFlag) Set

func (s *StringSliceFlag) Set(value string) error

func (*StringSliceFlag) String

func (s *StringSliceFlag) String() string

Jump to

Keyboard shortcuts

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