Closed quamen closed 10 years ago
Can you go to the Packages
> Go Plus
menu and select Display Go Information
, then copy the output from the message panel and paste it here?
On my laptop, this is:
Using Go: go1.3 darwin/amd64 (@/usr/local/bin/go)
GOPATH: /Users/jfitzgerald/go
Cover Tool: /usr/local/Cellar/go/1.3/libexec/pkg/tool/darwin_amd64/cover
Vet Tool: /usr/local/Cellar/go/1.3/libexec/pkg/tool/darwin_amd64/vet
Format Tool: /Users/jfitzgerald/go/bin/goimports
Lint Tool: /Users/jfitzgerald/go/bin/golint
Oracle Tool: /Users/jfitzgerald/go/bin/oracle
Also can you confirm that you have launched atom from the command line (Atom
> Install Shell Commands
), instead of via Finder / Dock / Spotlight?
Also can you confirm that you have launched atom from the command line
Yes, I have launched from the command line.
Can you go to the Packages > Go Plus menu and select Display Go Information, then copy the output from the message panel and paste it here?
Using Go: go1.2 darwin/amd64 (@/usr/local/go/bin/go)
GOPATH: /Users/quamen/src/gocode
Cover Tool: /usr/local/go/pkg/tool/darwin_amd64/cover
Vet Tool: /usr/local/go/pkg/tool/darwin_amd64/vet
Format Tool: Not Found
Lint Tool: /Users/quamen/src/gocode/bin/golint
Oracle Tool: Not Found
Great, looks like it's found go
just fine.
You have two options:
Format With Go Imports
preference >> should result in using gofmt
Packages
> Go Plus
> Get Missing Tools
or Packages
> Go Plus
> Update Tools
to get goimports
Actually, a third option is just to ensure you have goimports
available on your GOPATH
(in a bin subdirectory of one of your GOPATH segments). I.e. run go get -u code.google.com/p/go.tools/cmd/goimports
.
I think I should potentially add a bit more information to the 'Not Found' message for the format tool to indicate that it's looking for goimports
. The absence of that information probably threw you off in your investigation.
I took the third option, now everything is working as expected. Thanks for your help.
I think I should potentially add a bit more information to the 'Not Found' message for the format tool to indicate that it's looking for goimports. The absence of that information probably threw you off in your investigation.
I think that's a great idea, at the moment it doesn't give you any indication of what went wrong.
Thanks for your help sorting this out.
No worries mate (from a fellow Aussie, living in the US).
Hi,
Regarding goimports : in my particular case for isolation purposes I use a separate GOPATH for each project, and therefore looking for goimports in $GOPATH/bin is not the right solution. Would it be possible to also search for goimports in the PATH if not found elsewhere ?
Yes, we could do this. Keep in mind you can have multiple GOPATH elements, and it will search each for goimports; so you could make your project - specific GOPATH element the most precedent one, and things should work as expected.
But yes, we should be searching the path too for goimports (and other GOPATH/bin items).
Alright I did the modification locally and it works fine for me, I'll send you a pull request later today !
2014-07-23 14:08 GMT+02:00 Joe Fitzgerald notifications@github.com:
Yes, we could do this. Keep in mind you can have multiple GOPATH elements, and it will search each for goimports; so you could make your project - specific GOPATH element the most precedent one, and things should work as expected.
But yes, we should be searching the path too for goimports (and other GOPATH/bin items).
— Reply to this email directly or view it on GitHub https://github.com/joefitzgerald/go-plus/issues/41#issuecomment-49864956 .
@vanackere Thanks!
This is released in v2.0.1 just now.
Hi,
I was wondering how to resolve an issue where go-plus isn't picking up the gofmt tool. It's definitely installed and available on my system.
Any ideas?