Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Robert Engels
using line by line diffs you're really missing out (and creating a lot more work).If you ever used the Eclipse Java code changes review you'll know exactly what I mean.-Original Message- From: Manlio Perillo Sent: Feb 20, 2020 4:53 PM To: golang-nuts Subject: Re: [go-nuts] Re: [Proposal]

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Manlio Perillo
On Thursday, February 20, 2020 at 3:52:40 PM UTC+1, ohir wrote: > > Dnia 2020-02-20, o godz. 08:57:51 > David Riley > napisał(a): > > > I'm willing to be convinced otherwise. [...] > > a new "magic" tab that won't be supported > > This proposal is not about some "magic tab". It is about a

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Wojciech S. Czarnecki
> ("Smart tabs" were mentioned by Manilo in other thread. :) Uh, it was in this one, excuse me. Got both my and Manilo's mixed. -- Wojciech S. Czarnecki << ^oo^ >> OHIR-RIPE -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Wojciech S. Czarnecki
Dnia 2020-02-20, o godz. 08:57:51 David Riley napisał(a): > I'm willing to be convinced otherwise. [...] > a new "magic" tab that won't be supported This proposal is not about some "magic tab". It is about a gofmt formatting recipe that allows for minimal changesets while keeping "pretty"

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Robert Engels
Isn’t is easier to just set your diff display to ignore white space changes? Most modern IDEs have this option. > On Feb 20, 2020, at 7:59 AM, David Riley wrote: > > On Feb 20, 2020, at 8:35 AM, Manlio Perillo wrote: >> >> This is not a matter of style. It is a matter of having clean

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread David Riley
On Feb 20, 2020, at 8:35 AM, Manlio Perillo wrote: > > This is not a matter of style. It is a matter of having clean diffs in > commits. It is both. You may prioritize clean diffs, and I understand your reasons for that. Many other people prioritize readability over clean diffs. Neither

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Manlio Perillo
On Thursday, February 20, 2020 at 12:01:57 PM UTC+1, Amnon Baron Cohen wrote: > > Gofmt's style is no one's favorite, yet gofmt is everyone's favorite. >> > > > From Go Proverbs. > > https://www.youtube.com/watch?v=PAAkCSZUG1c=8m43s > > Rob

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Amnon Baron Cohen
> > Gofmt's style is no one's favorite, yet gofmt is everyone's favorite. > >From Go Proverbs. https://www.youtube.com/watch?v=PAAkCSZUG1c=8m43s Rob Pike answered this proposal in advance back in 2015. Wise words... -- You received

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Wojciech S. Czarnecki
Dnia 2020-02-20, o godz. 09:10:22 Jan Mercl <0xj...@gmail.com> napisał(a): > I believe the absence of any gofmt knobs (opt-ins) is a feature that's > not going away. You can always use your private fork, if you want. I do not want anymore ;) Knob is there _mostly_ because of all the past code in

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Wojciech S. Czarnecki
Dnia 2020-02-20, o godz. 08:25:57 Amnon BC napisał(a): > Good point Jan, and I totally agree. > > I noticed that the proposal states that it can only be implemented by the > core team. > > I don't really understand the statement, as go fmt is written in Go and all > the sources are available

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Amnon BC
Good point Jan, and I totally agree. I noticed that the proposal states that it can only be implemented by the core team. I don't really understand the statement, as go fmt is written in Go and all the sources are available online. So it might be worth expanding this statement to explain why

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-20 Thread Jan Mercl
On Wed, Feb 19, 2020 at 7:26 PM Wojciech S. Czarnecki wrote: > https://github.com/golang/go/issues/37299 "I propose to add an opt-in go fmt solution meant to minimize whitespace changes to the block where a code author hinted at desired comments position." I believe the absence of any gofmt

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-19 Thread Manlio Perillo
On Wednesday, February 19, 2020 at 7:26:32 PM UTC+1, ohir wrote: > > Dnia 2020-02-18, o godz. 10:16:57 > Manlio Perillo > napisał(a): > > > Here is an example of a diff with a lot of noise, where the actual > change > > is very hard to see: > >

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-19 Thread Wojciech S. Czarnecki
Dnia 2020-02-18, o godz. 10:16:57 Manlio Perillo napisał(a): > Here is an example of a diff with a lot of noise, where the actual change > is very hard to see: > https://gist.github.com/perillo/c5b3bdff9e8db9c89f316670d129c0dd > Manlio I just posted a brief proposal — keep tabs on it, as I

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-18 Thread David Riley
On Feb 18, 2020, at 9:15 PM, Wojciech S. Czarnecki wrote: > > [1] use marker relative to the opening brace hinting at the desired comment > position, ie. compute type-start position relative to the opening brace then > comment-start position relative to the marker from the comment of the brace >

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-18 Thread andrey mirtchovski
?w=1 is an option. On Tue, Feb 18, 2020 at 7:16 PM Wojciech S. Czarnecki wrote: > > Dnia 2020-02-18, o godz. 10:16:57 > Manlio Perillo napisał(a): > > > Here is an example of a diff with a lot of noise, where the actual change > > is very hard to see: > >

Re: [go-nuts] Re: [Proposal] Change how gofmt formats struct fields

2020-02-18 Thread Wojciech S. Czarnecki
Dnia 2020-02-18, o godz. 10:16:57 Manlio Perillo napisał(a): > Here is an example of a diff with a lot of noise, where the actual change > is very hard to see: > https://gist.github.com/perillo/c5b3bdff9e8db9c89f316670d129c0dd > > Note that using `git diff -w` is not a solution, since it can