This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Description
I'm running some custom logic to post-process a yaml document as a plain yaml.Node, which I obtain by :
var nodes yaml.Node
if err := decoder.Decode(&nodes); ...
but then I have no way to invoke the actual decoder code.
AFAICT Decoder only access the *parser once by calling parse(). Makes me wonder it would sound correct to refactor this so it relies on some Parser interface, so that one can use:
decoder := &Decoder{
Parser: customParserProducingNodes(),
}
decoder.Decode(&myStruct)
would this sound good? Happy to prepare a PR for this purpose