envflags

package
v0.0.51 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

README

envflags

Package for handling flags provided via Environment Variables. The usual stuff that is not provided by Standard Library but also not important enough to include a whole other obscure third-party library.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBoolDefault added in v0.0.39

func GetBoolDefault(envKey string, def bool) bool

GetBoolDefault looks up Environment Variable for a key. Variable value will be checked for a non case sensitive variation of the words true or false. Panics if no variation found

func GetIntDefault

func GetIntDefault(envKey string, def int) int

GetIntDefault looks up Environment Variable for a key. Variable value is converted if it is non-empty. If it is empty default value is returned. Panics when conversion fails.

func GetStringDefault

func GetStringDefault(envKey, def string) string

GetStringDefault looks up Environment Variable for a key. Variable value is returned if it is non-empty. If it is empty default value is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳