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
If I pass a type that implements Decoder to Process, the EnvDecode function is not called. However, if a field within my input struct implements Decoder, then EnvDecode is called.
Thank you for opening an issue. I'm not sure how this makes sense. The custom decoder accepts the environment variable as an input to the function. In your example, there's no place to define which environment variable to pass to the custom decode function.
I think I see what you mean: it's impossible to define a key for the top level input.
What's odd is that EnvDecode is being called at all given there can be no key in the first example, and there is no key in the second example. This is an artifact of the investigation into #61
I think I see what you mean: it's impossible to define a key for the top level input.
Right - you have to wrap it in another struct unfortunately. That's just a limitation of Go.
What's odd is that EnvDecode is being called at all given there can be no key in the first example, and there is no key in the second example. This is an artifact of the investigation into #61
Yea that makes sense. I'm going to close this out and we'll figure out a solution to #61.
If I pass a type that implements
Decoder
toProcess
, theEnvDecode
function is not called. However, if a field within my input struct implementsDecoder
, thenEnvDecode
is called.In https://go.dev/play/p/wforR2YscKr, I would expect
CALLED
to be printed after both1
and2
. It is only printed after2
.The text was updated successfully, but these errors were encountered: