helpers

package
v0.4.17 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeepMerge

func DeepMerge(base, overlay map[string]any) error

DeepMerge recursively merges overlay into base. Slices are appended, with values from overlay appearing after values from base.

func InsecureRandomString added in v0.4.6

func InsecureRandomString(n int) string

func LoadYAMLFile

func LoadYAMLFile(path string) (map[string]interface{}, error)

LoadYAMLFile loads a YAML file and unmarshals it into a map Returns an empty map if path is empty or file doesn't exist

func LookupLatestTag added in v0.4.3

func LookupLatestTag(ctx context.Context, imageRegistry string) (string, error)

Computes the latest image tag for a pullable, released main image.

func LookupMainImageTag

func LookupMainImageTag(ctx context.Context, imageRegistry string) (string, error)

func MapToStruct

func MapToStruct(m map[string]interface{}, out interface{}) error

func MergeMaps

func MergeMaps(base map[string]interface{}, overlays ...map[string]interface{}) (map[string]interface{}, error)

MergeMaps deeply merges multiple maps, with later maps taking precedence

func RunCommandWithOutput

func RunCommandWithOutput(title string, name string, args []string, opts ...CommandOption) (string, string, error)

RunCommandWithOutput executes a command and captures stdout/stderr

func ShellQuote added in v0.4.17

func ShellQuote(s string) string

ShellQuote wraps s in POSIX single quotes, safe for use in shell eval contexts.

Types

type CommandOption

type CommandOption func(*exec.Cmd)

CommandOption is a function that modifies an exec.Cmd

Jump to

Keyboard shortcuts

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