Documentation
¶
Overview ¶
Package util provides utility functions and types for the aqua CLI package. It contains shared functionality for parameter handling, configuration parsing, and common CLI operations used across different commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseTags ¶ added in v2.56.2
ParseTags converts a slice of tag strings into a map for fast lookup. It trims whitespace from each tag and filters out empty strings, returning a map where tag names are keys with empty struct values.
func SetParam ¶
func SetParam(args *cliargs.GlobalArgs, logger *slogutil.Logger, param *config.Param, version string) error
SetParam configures the parameter struct with values from global args, environment variables, and default settings. It processes command-line arguments, sets up logging, configures security settings, and initializes various operational parameters for aqua commands.
Types ¶
type Param ¶
type Param struct {
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
Logger *slogutil.Logger
Runtime *runtime.Runtime
Version string
}
Param holds common parameters used across CLI commands. It contains I/O streams, build information, logging configuration, and runtime information needed for command execution.