Re: [go-nuts] overriding keywords or rather allowing them to be part of a struct in go?

2016-10-04 Thread Dan Kortschak
On Mon, 2016-10-03 at 23:32 -0700, David Luu wrote: > type runKeywordReturnType struct{ > return interface{} > status string > output string > error string > traceback string > } > > Seems to not work since return and error are go keywords. You can't do so with return, but error is not

Fwd: [go-nuts] overriding keywords or rather allowing them to be part of a struct in go?

2016-10-04 Thread Pietro Gagliardi
> Begin forwarded message: > > From: Pietro Gagliardi > 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 > > Assuming the XML-RPC package uses it, the doc

Re: [go-nuts] overriding keywords or rather allowing them to be part of a struct in go?

2016-10-04 Thread Konstantin Khomoutov
On Mon, 3 Oct 2016 23:32:17 -0700 (PDT) David Luu wrote: > Say I wanted to define a struct like this: > > type runKeywordReturnType struct{ > return interface{} > status string > output string > error string > traceback string > } > > Seems to not work since return and error are go ke

Re: [go-nuts] overriding keywords or rather allowing them to be part of a struct in go?

2016-10-04 Thread Ian Lance Taylor
On Mon, Oct 3, 2016 at 11:32 PM, David Luu wrote: > > Say I wanted to define a struct like this: > > type runKeywordReturnType struct{ > return interface{} > status string > output string > error string > traceback string > } > > Seems to not work since return and error are go keywords.

Re: [go-nuts] overriding keywords or rather allowing them to be part of a struct in go?

2016-10-04 Thread 'chris dollin' via golang-nuts
On 4 October 2016 at 07:32, David Luu wrote: > Say I wanted to define a struct like this: > > type runKeywordReturnType struct{ > return interface{} > status string > output string > error string > traceback string > } > > Seems to not work since return and error are go keywords. If I ca

[go-nuts] overriding keywords or rather allowing them to be part of a struct in go?

2016-10-04 Thread David Luu
Say I wanted to define a struct like this: type runKeywordReturnType struct{ return interface{} status string output string error string traceback string } Seems to not work since return and error are go keywords. If I capitalize the first letter, that works. But say I really wanted to