Help us shape the future of Go! Take the 2026 Go Developer Survey

env

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(key string, fallback bool) bool

Bool returns a boolean environment value or fallback when unset or invalid.

func Duration

func Duration(key string, fallback time.Duration) time.Duration

Duration returns a duration environment value or fallback when unset or invalid.

func Environment added in v1.1.0

func Environment(files ...string) error

Environment loads optional dotenv files. Environment variables already set win.

func Int

func Int(key string, fallback int) int

Int returns an integer environment value or fallback when unset or invalid.

func String

func String(key, fallback string) string

String returns an environment value or fallback when unset.

Types

This section is empty.

Jump to

Keyboard shortcuts

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