Currently Unmarshal return error as soon as it is possible, which means that in the case of invalid env configuration we need to check it in a loop:
- Check error message about one value
- Fix one value
- Check error message about another one value
GOTO 2
I propose new alternatives for UnmarshalFromEnviron and Unmarshal to the API, which will return error of that type:
type ErrValidation struct {
Errors map[string]error
}
So I know exactly what is wrong in the configuration
Currently
Unmarshalreturn error as soon as it is possible, which means that in the case of invalid env configuration we need to check it in a loop:GOTO 2I propose new alternatives for
UnmarshalFromEnvironandUnmarshalto the API, which will return error of that type:So I know exactly what is wrong in the configuration