On Saturday, February 1, 2020 at 12:45:23 AM UTC+1, David Riley wrote:
>
> On Jan 30, 2020, at 8:46 AM, Manlio Perillo <manlio...@gmail.com 
> <javascript:>> wrote: 
> > 
> > Yes. 
> > 
> > In fact I wrote that alignment should be done by the editor, not gofmt. 
>
> In this scenario, the editor needs to understand Go formatting and apply 
> special formatting to tabs within struct fields? I strongly discourage 
> this. 
>
> It will also make structs look TERRIBLE when viewed as plain text (witness 
> the large corpus of C code which is only legible when viewed at a specific 
> tab width because their authors used this approach). 
>
> Go's current hard-tab predilection works currently because tabs are always 
> starting at a constant left offset (0) from the start of line; this is not 
> the case in struct fields, variable declarations, etc. 
>
>
> Please don't do this.  Or make it an opt-in.  This is not a good change to 
> force on users by default. 
>
>
You are right, thanks.
I guess the only possible solution is for gofmt to not align the fields, 
using only one space character between field name and field type.


Manlio 

-- 
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/993c4faa-54ea-48e1-8565-9d25986fbe7b%40googlegroups.com.

Reply via email to