kelseyhightower / envconfig

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

Byte slices from strings #141

Closed mickeyreiss closed 5 years ago

mickeyreiss commented 5 years ago

Foo []byte config variables need to be set as FOO=1,2,3. This makes sense technically, but it's a bit unintuitive. I would like to pass in []byte values as a string (or perhaps a base64 encoded string.)

I know this request potentially breaks compatibility, so maybe it's too late to make this change to the library. Thought I'd pass on the feedback nonetheless.

Thanks!

teepark commented 5 years ago

I think this is reasonable @mickeyreiss. Both approaches (treating []byte as like string or like []anythingelse) make sense, but the former is probably the more commonly desired behavior.

mickeyreiss commented 5 years ago

Thanks 🎉