env

package
v0.1.72 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolOr

func BoolOr(key string, def ...bool) bool

BoolOr returns environment variable as bool or default.

func DurationOr

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

DurationOr returns environment variable as Duration or default.

func IntOr

func IntOr(key string, def ...int) int

IntOr returns environment variable as int or default.

func Or

func Or(key string, def ...string) string

Or returns environment variable value or first non-empty default.

func SliceOr

func SliceOr(key string, def []string) []string

SliceOr returns environment variable as slice (comma-separated) or default.

func SliceSeparatorOr

func SliceSeparatorOr(key string, sep string, def []string) []string

SliceOr returns environment variable as slice (comma-separated) or default.

func Subst

func Subst(input string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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