env

package
v0.0.0-...-7e3aec1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBoolVal

func GetBoolVal(envVar string, defaultValue bool) bool

GetBoolVal retrieves a boolean value from given environment envVar. Returns default value if envVar is not set.

func GetStringVal

func GetStringVal(envVar string, defaultValue string) string

GetStringVal retrieves a string value from given environment envVar Returns default value if envVar is not set.

func ParseNumFromEnv

func ParseNumFromEnv(env string, defaultValue, min, max int) int

Helper function to parse a number from an environment variable. Returns a default if env is not set, is not parseable to a number, exceeds max (if max is greater than 0) or is less than min.

nolint:unparam

Types

This section is empty.

Jump to

Keyboard shortcuts

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