Re: [go-nuts] Re: Gofmt needs to allow newline-operator

2019-10-31 Thread Ian Lance Taylor
On Thu, Oct 31, 2019 at 5:06 PM wrote: > > I suppose the change I'm going for is a semicolon won't be inserted if the > next line starts with an operator. > > That seems to make pretty strait forward sense as no line will start with an > operator in the first place. The rule can't be that

Re: [go-nuts] Re: Gofmt needs to allow newline-operator

2019-10-31 Thread mr . sanchke
I suppose the change I'm going for is a semicolon won't be inserted if the next line starts with an operator. That seems to make pretty strait forward sense as no line will start with an operator in the first place. -- You received this message because you are subscribed to the Google Groups

Re: [go-nuts] Re: Gofmt needs to allow newline-operator

2019-10-31 Thread Ian Lance Taylor
On Thu, Oct 31, 2019 at 1:49 PM Max wrote: > > It's not just a matter of gofmt: the "implicit semicolon" rule of Go syntax > is triggered at the end of this line > ``` > if Variable1 == true > ``` > causing it to be parsed as > ``` > if Variable1 == true; > ``` > Any operator in the following

[go-nuts] Re: Gofmt needs to allow newline-operator

2019-10-31 Thread Max
Indeed. It's not just a matter of gofmt: the "implicit semicolon" rule of Go syntax is triggered at the end of this line ``` if Variable1 == true ``` causing it to be parsed as ``` if Variable1 == true; ``` Any operator in the following line arrives too late to change that. So to implement what

[go-nuts] Re: Gofmt needs to allow newline-operator

2019-10-31 Thread Ilia Choly
Your code doesn't even compile. On Thursday, October 31, 2019 at 1:13:50 PM UTC-4, kevma...@gmail.com wrote: > > I apologize for submitting yet another go format "issue". I'm more so > gauging the community on this idea. Furthermore, I ask that you understand > I'm not sure if this type of code