Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the possibility to get a single value #37

Open
vncntd opened this issue Aug 30, 2018 · 0 comments
Open

Add the possibility to get a single value #37

vncntd opened this issue Aug 30, 2018 · 0 comments

Comments

@vncntd
Copy link

vncntd commented Aug 30, 2018

Hey !

Using the library for a project I am looking for a way to be able to get a single value from the config and potentially load a different file following the returned value.

I think it should be really interesting to have a way to get this value without loading the whole config on a struct or having to create a struct with just one field to get it.

After taking a quick look at how you implemented the backends I think it should not be that hard to add a method like :

func (l *Loader) Get(name string) interface{}

or maybe something typed with a method for each ? (String, int ...)

WDYT ? I should take a look and try to work on it if this is something you are interested by.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant