forked from mitchellh/mapstructure
-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Hi 👋
Thanks for taking over the project!
I've noticed in the past (and today I'm noticing again), that it's not immediately obvious to me how to use the DecodeHookFunc* family of types/ funcs. Both times, I ended up diving into the code to understand how they work from reading the tests and implementations of StringTo{stdLibType}HookFuncs.
The code is very easy to read, so this wasn't exactly a bad experience 😄 But: I'd still expect the GoDoc to contain all the info I need to use them correctly.
IMO they could really use an example and/ or a section in the package overview. Therefore, I suggest to
- add an example for
DecodeHookFuncKind,DecodeHookFuncTypeandDecodeHookFuncValue - add argument names to the signatures of
DecodeHookFuncKindandDecodeHookFuncType(I don't think it's obvious in which orderfromandtoare used, and the thirdinterface{}argument can be cryptic without context) - perhaps add a section to the top-level package doc string
Would anybody object if I created a PR to do this?
gabyx
Metadata
Metadata
Assignees
Labels
No labels