Not sure if this is related to the Go.tmbundle, but I've just
discovered that gofmt assumes a tab width of 4 spaces, and obviously
expects tabs, not soft tabs. You can test it with the example given at
http://golang.org/doc/effective_go.html
type T struct {
name string; // name of the object
value int; // its value
}
becomes
type T struct {
name string; // name of the object
value int; // its value
}
Oh! Of course there are formatting options for gofmt, so feel free to
add them to the command somehow, though I can't imagine the community
as a whole wanting to deviate much from the default.
usage: gofmt [flags] [path ...]
-l=false: list files whose formatting differs from gofmt's
-w=false: write result to (source) file instead of stdout
-trace=false: print parse trace
-spaces=false: align with spaces instead of tabs
-tabwidth=8: tab width
-align=true: align columns
-comments=true: print comments
On Nov 11, 11:28 pm, Louis St-Amour <
louisstam...@gmail.com> wrote:
> I've a suggestion also, having just seenhttp://
golang.org/doc/effective_go.html