util

package
v2.56.4 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2026 License: MIT Imports: 13 Imported by: 0

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

func ParseTags(tags []string) map[string]struct{}

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.

Jump to

Keyboard shortcuts

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