> Begin forwarded message: > > From: Pietro Gagliardi <[email protected]> > Subject: Re: [go-nuts] overriding keywords or rather allowing them to be part > of a struct in go? > Date: October 4, 2016 at 12:59:54 PM EDT > To: David Luu <[email protected]> > > Assuming the XML-RPC package uses it, the documentation for encoding/xml will > have all the details. >> On Oct 4, 2016, at 12:53 PM, David Luu <[email protected] >> <mailto:[email protected]>> wrote: >> >> 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 <[email protected] <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 >> > <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 [email protected] >> <mailto:[email protected]>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. >
-- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
