kelseyhightower / envconfig

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

Fix type reporting for types that are slices #172

Open edwarnicke opened 4 years ago

edwarnicke commented 4 years ago

net.IP is defined as:

type IP []byte

prior to this PR, envconfig was interpretting that type of anything that was a slice of uint8 (including []byte) as a String.

That is the correct behavior if you really have a []uint8, but types that happen to be []uint8 should be reported as their actual type.

Signed-off-by: Ed Warnicke hagbard@gmail.com