env

package
v1.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllEnvVarsWithPrefix

func GetAllEnvVarsWithPrefix(prefix string) (map[string]string, error)

GetAllEnvVarsWithPrefix fetches environment variables that start with the specified prefix and returns an error if any of the variables either do not exist or have an empty value.

func GetAllFromHost

func GetAllFromHost() map[string]string

GetAllFromHost returns all the environment variables from the host

func GetEnvVarByKey added in v1.2.0

func GetEnvVarByKey(key string) (string, error)

Types

type Vars

type Vars map[string]string

func MergeEnvVars

func MergeEnvVars(envVars ...Vars) Vars

MergeEnvVars merges the environment variables from the specified maps.

Jump to

Keyboard shortcuts

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