env

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithDefaultBool

func WithDefaultBool(key string, def bool) bool

WithDefaultBool returns the boolean value of the supplied environment variable or, if not present, the supplied default value.

func WithDefaultDuration

func WithDefaultDuration(key string, def time.Duration) time.Duration

WithDefaultDuration returns the duration value of the supplied environment variable or, if not present, the supplied default value.

func WithDefaultFloat64

func WithDefaultFloat64(key string, def float64) float64

WithDefaultFloat64 returns the float64 value of the supplied environment variable or, if not present, the supplied default value. If the float64 conversion fails, returns the default

func WithDefaultInt

func WithDefaultInt(key string, def int) int

WithDefaultInt returns the int value of the supplied environment variable or, if not present, the supplied default value. If the int conversion fails, returns the default

func WithDefaultInt64

func WithDefaultInt64(key string, def int64) int64

WithDefaultInt64 returns the int value of the supplied environment variable or, if not present, the supplied default value. If the int conversion fails, returns the default

func WithDefaultString

func WithDefaultString(key string, def string) string

WithDefaultString returns the string value of the supplied environment variable or, if not present, the supplied default value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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