Functional configuration
bradleyjkemp opened this issue · comments
There are a number of rendering options that might be useful to be exposed to the user.
Probably best way to do this is similar to go-spew: have a Config struct which has the Map function and then a global default options struct which is used by the package level Map function.
- Max inlining size
- Whether or not to map private fields
- Full type names (package+type) vs abbreviated (just type name)
- Maximum depth?
- List of structs/types to ignore?
Do you need any help on this? Would like to contribute, you were a lifesaver this week. :)
Hey @nadilas, yeah that'd be great! What level would you be happy to contribute at?
If you want I can set up the basic framework (something along the lines of:
https://github.com/bradleyjkemp/cupaloy/blob/master/cupaloy.go#L13
and
https://github.com/bradleyjkemp/cupaloy/blob/master/config.go) and then you can work on the more interesting bit of actually adding config options.
Or you're welcome to do this boilerplate too if you want 🙂
Hi @bradleyjkemp, If you can lay down the framework, I'd be happy to work on the configs. That way you'll have the base structure in your lib as you wanted to design it ;-)
Just added a basic config framework in 1d8faf1 so I think you're good to go 🙂