You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 argument names to the signatures of DecodeHookFuncKind and DecodeHookFuncType (I don't think it's obvious in which order from and to are used, and the third interface{} argument can be cryptic without context)
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 ofStringTo{stdLibType}HookFunc
s.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
DecodeHookFuncKind
,DecodeHookFuncType
andDecodeHookFuncValue
DecodeHookFuncKind
andDecodeHookFuncType
(I don't think it's obvious in which orderfrom
andto
are used, and the thirdinterface{}
argument can be cryptic without context)Would anybody object if I created a PR to do this?
The text was updated successfully, but these errors were encountered: