Re: gofmt

2011-05-12 Thread Matthew Ong
On 4/23/2011 10:37 PM, Adam D. Ruppe wrote: http://golang.org/cmd/gofmt/ Oh my. Check this out: Examples To check files for unnecessary parentheses: gofmt -r '(a) - a' -l *.go To remove the parentheses: What a scary example. What an AST considers unnecessary parenthesis

gofmt

2011-04-23 Thread bearophile
I think this is a module (a standard command) of the Go standard library, it formats Go code in a standard way: http://golang.org/cmd/gofmt/ People use it, it's a way to enforce a shared coding style in the community of programmers of a language. So they are able to share modules with each

Re: gofmt

2011-04-23 Thread Adam D. Ruppe
http://golang.org/cmd/gofmt/ Oh my. Check this out: Examples To check files for unnecessary parentheses: gofmt -r '(a) - a' -l *.go To remove the parentheses: What a scary example. What an AST considers unnecessary parenthesis is probably very different from what I consider