os

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Getenv

func Getenv(key string, def string) string

Getenv wraps os.Getenv and returns the given default if empty or not defined.

func GetenvBool

func GetenvBool(key string, def bool) (bool, error)

GetenvBool wraps os.Getenv and returns a bool or the given default if empty or not defined.

func GetenvFloat64 added in v0.0.2

func GetenvFloat64(key string, def float64) (float64, error)

GetenvFloat64 wraps os.Getenv and returns an int or the given default if empty or not defined.

func GetenvInt64 added in v0.0.2

func GetenvInt64(key string, def int64) (int64, error)

GetenvInt64 wraps os.Getenv and returns an int or the given default if empty or not defined.

func GetenvStringSlice added in v0.0.2

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

GetenvStringSlice wraps os.Getenv and returns a string slice or the given default if empty or not defined.

func HasEnv added in v0.0.2

func HasEnv(key string) bool

HasEnv return true if given env var is defined.

func MustHasEnv added in v0.0.2

func MustHasEnv(key string)

MustHasEnv panics if the given env var does not exists.

Types

This section is empty.

Jump to

Keyboard shortcuts

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