Documentation ¶
Index ¶
- func AllUnique[T comparable](sl []T) bool
- func DecodeOptions(in io.ReadCloser, formatHint string, out any) error
- func Exec(ctx context.Context, command string, args ...string) error
- func ExecOutput(ctx context.Context, command string, args ...string) ([]byte, error)
- func Pointer[T any](t T) *T
- func PrettyByteSize(b int64) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllUnique ¶ added in v0.1.2
func AllUnique[T comparable](sl []T) bool
AllUnique returns true if all elements in the given slice are unique.
func DecodeOptions ¶
func DecodeOptions(in io.ReadCloser, formatHint string, out any) error
DecodeOptions will attempt to decode the given reader into the given object. The formatHint is used to select the format of the document. If the formatHint is empty, the format is guessed from the document. The document is first treated as a go-template with some custom functions. This allows us to use environment variables and file contents in the config.
func ExecOutput ¶
ExecOutput executes a command with context and returns the output.
func PrettyByteSize ¶ added in v0.1.2
PrettyByteSize returns a human-readable string of the given byte size.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.