Re: [go-nuts] CodeReviewComments: Recommendation of gofmt

2017-02-15 Thread roger peppe
On 15 February 2017 at 13:48, wrote: >> >> > Side-note: I don't think goimports can actually do what you are saying, >> > can it? Because, if you run goimports on a valid program, it won't actually >> > *change* any imports, it might just reformat it. For goimports to change >> > anything semanti

Re: [go-nuts] CodeReviewComments: Recommendation of gofmt

2017-02-15 Thread howardcshaw
> > > > Side-note: I don't think goimports can actually do what you are saying, > can it? Because, if you run goimports on a valid program, it won't actually > *change* any imports, it might just reformat it. For goimports to change > anything semantically, the program would need to have missin

Re: [go-nuts] CodeReviewComments: Recommendation of gofmt

2017-02-11 Thread Jan Mercl
On Sat, Feb 11, 2017 at 5:07 PM Axel Wagner wrote: > What about a) vs. c)? c) is fine, but as it's a matter of personal taste, ie. it's IMO more or less bike shedding. IOW, whatever choice as long as it's a single one. Actually, the split goimports bring to the one-true-gofmt-style is another, a

Re: [go-nuts] CodeReviewComments: Recommendation of gofmt

2017-02-11 Thread 'Axel Wagner' via golang-nuts
Which is a strong opinion against b). What about a) vs. c)? Side-note: I don't think goimports can actually do what you are saying, can it? Because, if you run goimports on a valid program, it won't actually *change* any imports, it might just reformat it. For goimports to change anything semantic

Re: [go-nuts] CodeReviewComments: Recommendation of gofmt

2017-02-11 Thread Jan Mercl
On Sat, Feb 11, 2017 at 4:30 PM 'Axel Wagner' via golang-nuts < golang-nuts@googlegroups.com> wrote: > Am I alone in being bothered by this? ^^ My personal opinion is that a tool that can, even potentially, turn a valid program into an invalid one, or worse, silently into another valid program wi

[go-nuts] CodeReviewComments: Recommendation of gofmt

2017-02-11 Thread 'Axel Wagner' via golang-nuts
Hi, (disclaimer: This is a nit) in the Code Review Comments , we are recommending that people use gofmt, giving goimports as an alternative. That makes me somewhat uncomfortable, as while each itself is idempotent, gofmt clean code might