top | item 45728998

(no title)

no_carrier | 4 months ago

Tabs are the recommended indentation method for Go code. It is interesting that they switched after the first example, though.

discuss

order

alain_gilbert|4 months ago

I'm well aware of it. But I don't think I have ever seen an editor/website which would display it as 9 spaces. Github for example default to 4 spaces width.

unscaled|4 months ago

Yes, this is very weird. But Go Playground[1] has always been using 8 spaces per tab for some reason. I always found that very jarring, particularly where almost every other editor or documentation has settled on 4 spaces per tab.

[1] https://go.dev/play/