kelseyhightower / envconfig

Golang library for managing configuration data from environment variables
MIT License
5.02k stars 377 forks source link

Store the low level error that raised ParseError #64

Closed rafaeljusto closed 7 years ago

rafaeljusto commented 7 years ago

In some sittuations we would like to know exactly what caused the ParseError in a specific field. With this change the error message from ParseError would be different (with an extra details section):

envconfig.Process: assigning TEST_VAR1 to var1: converting 'hello' to type int. details: strconv.ParseInt: parsing "hello": invalid syntax
rafaeljusto commented 7 years ago

Resolves #57

teepark commented 7 years ago

This is great @rafaeljusto, thank you!