env icon indicating copy to clipboard operation
env copied to clipboard

A simple and zero-dependencies library to parse environment variables into structs

Results 35 env issues
Sort by recently updated
recently updated
newest added

`Parse` should try to read each of the variables before failing when checking for required, so that way users do not have to enter each one manually and find each...

enhancement

Following the issue raised in #202, if a pointer struct is used then the default object is not created - this is different to a non-pointer object. See the following...

Hello, In my case I want to use the "notEmpty" tag for a field like: ``` type foobar struct{ IsEnabled bool `env:"IS_ENABLED" envDefault:"true"` Name string `env:"NAME,notEmpty"` } ``` but the...

size/L

Hey Currently, doing something like this: ```go type config struct { Field string `env:"field,required,notEmpty"` } func New() *config { return &config{ Field: FunctionThatComputesFieldDefault(), } } func (c *config) Load() error...

enhancement

In some cases, it's useful to be able to retrieve all the possible configurations of an application. To address this, it would be great to have a feature that allows...

ref: ```golang package main import ( "encoding/json" "fmt" "log" "os" "github.com/caarlos0/env/v10" ) type Test struct { Str string `env:"TEST"` } type ComplexConfig struct { Foos []Test `envPrefix:"FOO_"` Clean Test `envPrefix:"BAR_"`...

Hi folks, we noticed that for configs with JSON pointing to map[string][]string, it fails with the error, and we are unable to parse these JSONs. Could you please help us...

After https://github.com/caarlos0/env/pull/306 it appears all `nil` fields in the struct will be initialized to an empty value, even fields without an `env` tag. I believe this initialization should only happen...

feat: mapping slice of complex struct. [#298](https://github.com/caarlos0/env/issues/298)

size/L