At the weekly I think it's still a []byte (I only mention this in case you're at tip by accident, though I could be wrong). At tip, you can use the Decoder interface.The change was made to bring its API into line with gob and JSON.
Just convert your old
err := xml.Unmarshal(a, b)
onto:
err := xml.NewDecoder(a).Decode(b)
The reason it doesn't do it automatically for you with gofix is that
the new xml.Unmarshal has a similar signature to the old one, so it's
not entirely easy to figure if it should be updated or not. That said,
it should be doable for some simpler cases, and I may improve the
gofix module a bit more if I find the time.
--
Gustavo Niemeyer
http://niemeyer.net
http://niemeyer.net/plus
http://niemeyer.net/twitter
http://niemeyer.net/blog
-- I'm not absolutely sure of anything.