goenv

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2021 License: MIT Imports: 5 Imported by: 5 modules, 6 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-env

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanGet

func CanGet(key string, def string) string

func CanGetBool added in v0.0.4

func CanGetBool(key string, def bool) bool

func CanGetInt added in v0.1.0

func CanGetInt(key string, def int) int

func CanGetInt32

func CanGetInt32(key string, def int32) int32

func CanGetInt64 added in v0.1.0

func CanGetInt64(key string, def int64) int64

func CanGetSlice added in v0.0.3

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

func MustGet

func MustGet(key string) string

MustGet will return the env or panic if it is not present.

It will also check if the key exists with _FILE at the end, if a key exists like that, the value from the file will be loaded.

func MustGetBool

func MustGetBool(key string) bool

MustGetBool will return the env as boolean or panic if it is not present

func MustGetFromFile added in v0.1.0

func MustGetFromFile(filename string) string

func MustGetInt added in v0.1.0

func MustGetInt(key string) int

MustGetInt will return the env as int or panic if it is not present

func MustGetInt32

func MustGetInt32(key string) int32

MustGetInt32 will return the env as int or panic if it is not present

func MustGetInt64

func MustGetInt64(key string) int64

MustGetInt64 will return the env as int64 or panic if it is not present

func MustGetSecretFromEnv

func MustGetSecretFromEnv(env string) string

func MustGetSecretFromFile

func MustGetSecretFromFile(filename string) string

func MustGetSecretUint64FromEnv

func MustGetSecretUint64FromEnv(env string) uint64

func MustGetSecretUint64FromFile

func MustGetSecretUint64FromFile(filename string) uint64

func MustGetSlice added in v0.0.3

func MustGetSlice(key 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
⌂ 换网址