util

package
v0.1.19 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringSetAppend

func StringSetAppend(set []string, vals ...string) []string

func ToSafeGoVariableName

func ToSafeGoVariableName(name string) string

func ValidateStrArg

func ValidateStrArg(arg string, allowed []string) error

Types

type AtomicBool

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

func (*AtomicBool) Load

func (b *AtomicBool) Load() bool

func (*AtomicBool) Store

func (b *AtomicBool) Store(value bool)

type CommandBuilder added in v0.1.7

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

func NewCommand added in v0.1.7

func NewCommand(ctx context.Context, cmdname string, args ...string) *CommandBuilder

func (*CommandBuilder) DisableStderr added in v0.1.7

func (c *CommandBuilder) DisableStderr() *CommandBuilder

func (*CommandBuilder) DisableStdout added in v0.1.7

func (c *CommandBuilder) DisableStdout() *CommandBuilder

func (*CommandBuilder) Run added in v0.1.7

func (c *CommandBuilder) Run() (CommandResult, error)

func (*CommandBuilder) StderrToString added in v0.1.7

func (c *CommandBuilder) StderrToString() *CommandBuilder

func (*CommandBuilder) StdinFromString added in v0.1.7

func (c *CommandBuilder) StdinFromString(input string) *CommandBuilder

func (*CommandBuilder) StdoutToString added in v0.1.7

func (c *CommandBuilder) StdoutToString() *CommandBuilder

type CommandResult added in v0.1.7

type CommandResult struct {
	IsOtherError bool
	ExitCode     int
	Stdout       string
	Stderr       string
}

type YAMLData

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

func NewYAMLData

func NewYAMLData(path string) YAMLData

func (*YAMLData) ReadFile

func (d *YAMLData) ReadFile(out interface{}) error

func (*YAMLData) SaveFile

func (d *YAMLData) SaveFile(in interface{}) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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