Giving any of the fmt.*f functions a xmlpath.Node will result in an infinite recursion and an eventual stack overflow. This happens due to Node.nodes containing non-pointers and the recursive referencing with the nodes in it.
While the fmt package is the one at fault for not handling recursion. xmlpath might want to implement a GoString to avoid the stack overflow for users.
Reported it as a Go issue too as issue 8241. This mostly to get a fmt documentation update.
Giving any of the
fmt.*f
functions axmlpath.Node
will result in an infinite recursion and an eventual stack overflow. This happens due toNode.nodes
containing non-pointers and the recursive referencing with the nodes in it.non-xmlpath reproduce xmlpath reproduce
While the
fmt
package is the one at fault for not handling recursion.xmlpath
might want to implement aGoString
to avoid the stack overflow for users.Reported it as a Go issue too as issue 8241. This mostly to get a
fmt
documentation update.