helpers

package
v1.25.2-1 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2022 License: MIT Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendToFile

func AppendToFile(path string, extraContent []byte, mode os.FileMode) error

func AsgName

func AsgName(sess *session.Session) (*string, error)

func AtomicWrite

func AtomicWrite(path string, contents []byte, mode os.FileMode) error

func EnsureEnvironment

func EnsureEnvironment(environment []string) (map[string]string, error)

func IdempotentDo

func IdempotentDo(checker func() (bool, error), doer func() error) error

func InputToMapping

func InputToMapping(inputFile string) (map[string]string, error)

func IsIndexOne

func IsIndexOne(sess *session.Session, inputFile string) (bool, error)

func MapKeys

func MapKeys(mapping map[string]string) []string

func MyID

func MyID(sess *session.Session) (string, error)

func MyIP

func MyIP(sess *session.Session) (string, error)

func MyIndex

func MyIndex(mapping map[string]string, ip string) string

func SortMapKeys

func SortMapKeys(mapping map[string]string) []string

func WaitFor

func WaitFor(duration time.Duration, checker func() error) error

func WriteIfChanged

func WriteIfChanged(path string, contents []byte, mode os.FileMode) error

Types

type CommandOutput

type CommandOutput struct {
	ExitStatus int
	Stdout     string
	Stderr     string
}

func RunCommand

func RunCommand(command string, args ...string) *CommandOutput

Jump to

Keyboard shortcuts

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