Registry / config / meowgorithm-babyenv

meowgorithm-babyenv

JSON →
library1.3.1gogounverified

A library that collects environment variables and maps them to struct fields, reducing boilerplate.

go get github.com/meowgorithm/babyenv
INSTALL
IMPORT
SIG · MEOWGORITHM-BABYEN
M
meowgorithm-babyenv
configgov1.3.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

babyenv
github.com/meowgorithm/babyenv

Parse environment variables into a struct

package main import ( "fmt" "github.com/meowgorithm/babyenv" ) type Config struct { Port int `env:"PORT" default:"8080"` Host string `env:"HOST" required:"true"` } func main() { var cfg Config err := babyenv.Parse(&cfg) if err != nil { panic(err) } fmt.Printf("Host: %s, Port: %d\n", cfg.Host, cfg.Port) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.3.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
24
Resources
meowgorithm-babyenv — go get meowgorithm-babyenv · libregistry