2 ms·
That means tabs for indentation, and spaces for alignment. Not a go user (yet), but this one caught my attention as being a little ugly. I'm a fan of only usin
by allochthon 12y ago
That means tabs for indentation, and spaces for alignment.
Not a go user (yet), but this one caught my attention as being a little ugly. I'm a fan of only using spaces.
- NateDad 12y agoTabs are just customizable whitespace. If you like 6 space indents and I like 2 space, we can both be happy if it's tabs, and just configure our editors the way we like. With gofmt, there's no danger of mixing spaces and tabs (not that it's actually dangerous, since whitespace isn't important in go).
- jussij 12y agoThat is just the gofmt default. That same gofmt utility also has this option: -tabs=true : indent with tabs which when set to false will uses spaces instead of tabs for all indent.