Hacker News new | ask | show | jobs
by no_carrier 238 days ago
Tabs are the recommended indentation method for Go code. It is interesting that they switched after the first example, though.
1 comments

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.
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/