env

package
v14.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBool

func GetBool(name string, fallback bool) (bool, error)

GetBool fetches and parses a boolean typed environment variable

If the variable is empty, returns `fallback` and no error. If there is an error, returns `fallback` and the error.

func GetDuration added in v14.8.0

func GetDuration(name string, fallback time.Duration) (time.Duration, error)

GetDuration fetches and parses a duration typed environment variable

func GetInt

func GetInt(name string, fallback int) (int, error)

GetInt fetches and parses an integer typed environment variable

If the variable is empty, returns `fallback` and no error. If there is an error, returns `fallback` and the error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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