It would be useful to prevent silent misconfigurations to have envconfig optionally be able to check if any of the environment variables currently set match the application prefix but is not in the set of allowed variable names.
type config struct {
a int
b int `ignored:"true"`
}
assuming the application prefix is MYAPP, the optional check should return the corresponding error if supplied with each env var:
MYAPP_A=1 # no error
MYAPP_B=1 # error: attempting to set ignored variable MYAPP_B
MYAPP_C=1 # error: attempting to set unknown variable MYAPP_C
It would be useful to prevent silent misconfigurations to have envconfig optionally be able to check if any of the environment variables currently set match the application prefix but is not in the set of allowed variable names.
assuming the application prefix is
MYAPP
, the optional check should return the corresponding error if supplied with each env var: