helpers

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 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]interface{}) error

deepMerge recursively merges overlay into base

func InsecureRandomString added in v0.4.6

func InsecureRandomString(n int) string

func IsNil

func IsNil(i interface{}) bool

IsNil uses reflection to reliably check if the provided argument is a Nil pointer.

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 LogMultilineYaml

func LogMultilineYaml(log *logger.Logger, v any) error

func LookupLatestTag added in v0.4.3

func LookupLatestTag(ctx context.Context, log *logger.Logger) (string, error)

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

func LookupMainImageTag

func LookupMainImageTag(ctx context.Context, log *logger.Logger) (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

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