I was just about to mention that part about struct tags thing, where I've seen it used for JSON marshaling/unmarshaling. I'm new to go, so still learning. Where can I find more details on that feature (in general)? It's already built-in for use with XML? Or does one have to implement the parsing/marshalling mapping code of the struct tag to actual struct value? Since I assume one has to implement that if mapping between a new custom format besides say JSON and XML for example.
On Tuesday, October 4, 2016 at 9:18:29 AM UTC-7, Konstantin Khomoutov wrote: > > On Tue, 4 Oct 2016 08:54:32 -0700 (PDT) > David Luu <mang...@gmail.com <javascript:>> wrote: > > > >> Why do you care? > > > > I personally wouldn't but a (test framework) protocol built on top of > > XML-RPC that I want to interface to expects the following response > > back: > > > > <methodResponse> > > <params> > > <param> > > <value><struct> > > <member><name>return</name> > [...] > > and the only XML-RPC (server) package for go I've > > found: https://github.com/divan/gorilla-xmlrpc, guess what it uses to > > map that kind of XML-RPC data structure to? A go struct. That was > > looking over the README, haven't delved into the code for that > > package, but there might not be other alternative options w/o > > modifying that package's code. A go map might have been more flexible > > to workaround naming issues. > [...] > > Can't you not use the standard way to deal with this -- using struct > tags? > > type response struct { > Return string `xml:"return"` > ... > } > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.