ardanlabs/conf

`field` type should be exported in order to implement `Sourcer`

Enrico204 opened this issue · 4 comments

I'm trying to implement a Sourcer (to be provided to Parse()) for loading configuration from a YAML file, but apparently it's not possible due the fact that field is unexported.

I think that field type should be exported to make Sourcer useful.

PS: thanks for your amazing work :-D

Ok, let me look into this over the weekend. But if you want to put a PR together that would be great as well. Sorry for the mishap.

Oh you are right. I have an exported interface with a type that is unexported so you can't build a sourcer. Oops. Let me see if I can make this change without need to go to a v2.

I added a v1.2.0 which makes the Field type and its fields all exported for access to build external sourcers. Please let me know how it goes.

Perfect 👍 It works amazingly well, simple and effective :-)
Thank you! :-)