env

package
v0.0.0-...-8a31ae8 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBoolOrDefault

func GetBoolOrDefault(name string, defaultV bool) bool

GetBoolOrDefault will return the value of the environment variable name provided if it exists. If the environment variable can't be found, or an error occurs, returns defaultV.

func GetDurationOrDefault

func GetDurationOrDefault(name string, defaultV time.Duration) time.Duration

GetDurationOrDefault will return the value of the environment variable name provided if it exists. If the environment variable can't be found, or an error occurs, returns defaultV.

func GetIntOrDefault

func GetIntOrDefault(name string, defaultV int) int

GetIntOrDefault will return the value of the environment variable name provided if it exists. If the environment variable can't be found, or an error occurs, returns defaultV.

func GetStringOrDefault

func GetStringOrDefault(name, defaultV string) string

GetStringOrDefault will return the value of the environment variable name provided if it exists. If the environment variable can't be found, returns defaultV.

Types

This section is empty.

Jump to

Keyboard shortcuts

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