Skip to content

linka-cloud/go-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Env

Language: Go Go Reference

A generic typed implementation of environment variables.

package env // import "go.linka.cloud/env"


// FUNCTIONS

func Get[T Value](name string) T
func GetDefault[T Value](key string, defaultVal T) T
func GetSlice[T Value](name string) []T
func GetSliceDefault[T Value](name string, def []T) []T
func Set[T Value](name string, v T) error
func SetSlice[T Value](name string, v []T) error
func Unset(name string) error

// TYPES

type Value interface {
float32 | float64 |
uint | uint8 | uint16 | uint32 | uint64 |
int | int8 | int16 | int32 | int64 |
bool |
string |
time.Time | time.Duration |
net.IP | net.IPNet | netip.Addr | netip.Prefix | netip.AddrPort
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages