3 ms·
Gofmt rewrites spaces to tabs
by masonj188 5y ago
Gofmt rewrites spaces to tabs
- professoretc 5y agoI'm not familiar with the standard Go coding style. Does it correctly handle the case mentioned above, where you have a function call like connect(option1, option2, option3); That is, will the spaces from the column `connect` starts in be preserved as spaces, or will they be converted to tabs?
- alias_neo 5y agoIndeed it does. Well there you go, I'm full of sh*t because having just checked a few of our Go projects, they're all Tab indented. My editors use tabs when editing Go files, and spaces for others. YAML for example uses spaces. I guess it's so well handled, and transparently so that I hadn't even realised. Also the spaces thing was a joke, I don't tell my team to uses spaces or tabs, I just tell them to follow the Go programming standards/guidelines when writing Go.