env

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetValue = func(k, d string) string {
	if v := os.Getenv(k); v != "" {
		return v
	}

	return d
}

GetValue retrieves the value of environment variable named by the key. It returns the value, if not then it will return the default value passed as the second parameter.

Functions

func EnvData

func EnvData(requiredFields, unrequiredFields []string) map[string]string

requiredFields - list of fields which are mandates unrequiredFields - list of fields which are not mandates returns a map with rFields values and uFields values

Types

This section is empty.

Jump to

Keyboard shortcuts

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