envvar

package
v5.36.4 Latest Latest
Warning

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

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

Documentation

Overview

Package envvar provides utilities for working with environment variables.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expand

func Expand(value string) string

Expand replaces ${VAR_NAME} and ${VAR_NAME:-default} placeholders with their environment variable values. If a referenced environment variable is not set:

  • With default syntax ${VAR:-default}: uses the default value
  • Without default ${VAR}: uses empty string and logs a warning

func ExpandBytes

func ExpandBytes(data []byte) []byte

ExpandBytes expands environment variables in byte slice content. This is a convenience wrapper for expanding YAML or other file content.

Types

This section is empty.

Jump to

Keyboard shortcuts

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