Closed veqryn closed 7 years ago
I was expecting the below to succeed, since ENV is set. However, the error I get says that MYAPP_ENV must exist. Perhaps we need a required_any:"true" tag? I may be able to make a PR, but I want to know what you think first?
ENV
MYAPP_ENV
required_any:"true"
export ENV="dev" export MYAPP_STUFF="stuff"
type AllEnv struct { Env string `required:"true"` Stuff string `required:"true"` } func TestNewEnvVars(t *testing.T) { var env AllEnv envconfig.MustProcess("MYAPP", &env) }
Nevermind, I didn't realize I needed the envconvig tag.
envconvig
I was expecting the below to succeed, since
ENV
is set. However, the error I get says thatMYAPP_ENV
must exist. Perhaps we need arequired_any:"true"
tag? I may be able to make a PR, but I want to know what you think first?