Of course the tab is elastic **only** for a struct fields.  gofmt will 
continue to format other code normally.
Struct fields are the only block of code that gofmt will align 
automatically, and the alignment may change is you add or remove a field.

Manlio Perillo

On Thursday, January 30, 2020 at 2:46:59 PM UTC+1, Manlio Perillo wrote:
>
> Yes.
>
> In fact I wrote that alignment should be done by the editor, not gofmt.
>
>
> Manlio Perillo
>
> On Thursday, January 30, 2020 at 1:46:37 AM UTC+1, kortschak wrote:
>>
>> I suspect Manlio was referring to something like this 
>> http://nickgravgaard.com/elastic-tabstops/. 
>>
>> Dan 
>>
>> On Thu, 2020-01-30 at 01:10 +0100, Wojciech S. Czarnecki wrote: 
>> > Dnia 2020-01-29, o godz. 09:56:35 
>> > Manlio Perillo <manlio...@gmail.com> napisaƂ(a): 
>> > 
>> > > What I propose is to use a tab between the field name and type. 
>> > > It is responsibility of the editor or html formatter to align the 
>> > > code. 
>> > 
>> > This ("between") assumes an agreed constant width of the tab 
>> > representation. 
>> > Ie. it will never work as intended in the field as people are using 
>> > tabwidths from 2 to 8. 
>> > 
>> > > Manlio Perillo 
>> > 
>> > Hope this helps, 
>> > 
>> > -- 
>> > Wojciech S. Czarnecki 
>> >  << ^oo^ >> OHIR-RIPE 
>> > 
>> > -- 
>> > 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 golan...@googlegroups.com. 
>> > To view this discussion on the web visit 
>> > 
>> https://groups.google.com/d/msgid/golang-nuts/20200130011051.2e18a964%40xmint
>>  
>> > . 
>>
>>
>>

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c01de3c1-e2fd-4dbe-bc3e-abf0bd2b4fa3%40googlegroups.com.

Reply via email to