expandenv

package module
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

README

go-expandenv

Simple helper library to expand environment variables into interface{}. The primary use case it to use it to properly expand environment variables into YAML files while properly supporting multi-line environment variables as well:

standard: ${ENV_1}
as-number: ${ENV_2:number}
as-boolean: ${ENV_3:boolean}
with-fallback: ${ENV_4:-standard}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expand

func Expand(input interface{}, values VariableLookup) (interface{}, error)

func ExpandEnv

func ExpandEnv(input interface{}) (interface{}, error)

func ExpandMap

func ExpandMap(input interface{}, values map[string]string) (interface{}, error)

Types

type VariableLookup

type VariableLookup = func(key string) (*string, error)

Jump to

Keyboard shortcuts

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