envtemplate

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LookupEnv

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

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

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