▲ 1 ▼ Struct handling and unsecured functions
- Complex field validation or setting a custom field when using PopulateStruct function could be handled by implementing StructWalker on given structure
- Add several counterpart functions of existing getters, but without returning any errors, to ease value fetching when all checking have already been done
Register to comment or vote on this story
I don't find the release notes or the description very helpful in understanding what's going on. I guess the unsecured functions is about having getters that don't return an error? But what about the first bit?
It's a general helper library to handle environment variables. You have helpers to handle a "flat" configuration to parse easily integer, float and so on, but you have helpers as well to store a config in your environment variables like you would do with a yaml file. For instance thoses two variables, "CONFIG_DB_PORT=3306" and "CONFIG_DB_HOST=localhost" will produce a tree CONFIG -> DB -> [PORT: 3306, HOST: "localhost"], you have some convenient functions to browse the tree and get datas but you can also dump this tree into a struct. This release add the ability, when the struct is populated, to custom the data validation or to populate some fields with your own logic, have a look here : https://github.com/antham/envh#example-with-a-tree-dumped-in-a-config-struct and you have examples in godoc as well.
Thanks for the explanation, I think it'd be useful to have that sort of thing at the start of your readme in a few clear sentences.
I can add much more details to the actual README sum up indeed. I thought a short description and an example in README and many examples in godoc would be enough but I guess I missed the "catch" part where you get an insight instantly of a project. I find it each time this exercise difficult, to be able to express clearly a key feature of something with few words. Thanks for the feedback.
It's just a sum up, I forgot a bit of information, I did it in a hurry, but you also need to have some context to understand by looking at the repository. There are several examples provided in documentation to understand what's going on.
I think this could do with a better explanation, like Daenney, I was a bit confused as to what it is for. Is it for reading env variables into structs or writing them?