envtemplate

package
v1.101.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 7 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LookupEnv added in v1.83.0

func LookupEnv(name string) (string, bool)

LookupEnv returns the expanded environment variable value for the given name.

The expanded means that `%{ENV_VAR}` placeholders in env var value are replaced with the corresponding ENV_VAR values (recursively).

false is returned if environment variable isn't found.

func ReplaceBytes added in v1.83.0

func ReplaceBytes(b []byte) ([]byte, error)

ReplaceBytes replaces `%{ENV_VAR}` placeholders in b with the corresponding ENV_VAR values.

Error is returned if ENV_VAR isn't set for some `%{ENV_VAR}` placeholder.

func ReplaceString added in v1.83.0

func ReplaceString(s string) (string, error)

ReplaceString replaces `%{ENV_VAR}` placeholders in b with the corresponding ENV_VAR values.

Error is returned if ENV_VAR isn't set for some `%{ENV_VAR}` placeholder.

Types

This section is empty.

Jump to

Keyboard shortcuts

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