env_kit

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchOsEnvArray

func FetchOsEnvArray(key string) []string

FetchOsEnvArray

fetch os env split by `,` and trim space
return not found will return []string(nil).

func FetchOsEnvBool

func FetchOsEnvBool(key string, defValue bool) bool

FetchOsEnvBool

fetch os env by key.
if not found will return defValue.
return env not same as true (will be lowercase, so TRUE is same)

func FetchOsEnvInt

func FetchOsEnvInt(key string, defValue int) int

FetchOsEnvInt

fetch os env by key.
return not found will return devValue.
if not parse to int, return defValue

func FetchOsEnvStr

func FetchOsEnvStr(key, defValue string) string

FetchOsEnvStr

fetch os env by key.
return not found will return defValue.

func SetEnvBool

func SetEnvBool(key string, val bool)

SetEnvBool

set env by key and val

func SetEnvInt64

func SetEnvInt64(key string, val int64)

SetEnvInt64

set env by key and val

func SetEnvStr

func SetEnvStr(key string, val string)

SetEnvStr

set env by key and val

func SetEnvU64

func SetEnvU64(key string, val uint64)

SetEnvU64

set env by key and val

Types

This section is empty.

Jump to

Keyboard shortcuts

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