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 <frave...@gmail.com <javascript:>> 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" autoformatting > of structs > intact. ("Smart tabs" were mentioned by Manilo in other thread. :) > > I proposed to use a tab in order for gofmt to recognize it and not reformat that field. If we use a space, gofmt will not work correctly on existing code that is already formatted and should not be reformatted.
Maybe a better idea is to use a U+00A0 NO-BREAK SPACE. When gofmt see it, it should leave the formatting as is. There is still the problem with older versions of gofmt if the code is also modified by others, and the fact that NO-BREAK-SPACE is not easy to input. But gofmt may automatically insert it if it is used in the other fields. > [...] 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/7d8a430a-b1d9-4d69-9814-0c8e39b3546f%40googlegroups.com.