Reputation: 22254
I'm on an iMac 27'' late 2013 model and I want to run the gofmt
tool against my package.
I'm calling it like so:
iMacs-Image:sergiotapia ~/smitego $ gofmt
And it's frozen there forever, never completing. Any suggestions?
Upvotes: 7
Views: 2940
Reputation: 93004
You're calling it incorrectly. gofmt
expects a source file on its standard input and outputs formatted code on standard output. Use go fmt
(with a space) inside the directory of the package you want to format to format the code inside a package.
Upvotes: 14