-
|
I've installed staticcheck by doing go install command But when I do the command Running on Ubuntu |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
What happens if you run:
It sounds like A line like this at the bottom of your export PATH=$PATH:$(go env GOPATH)/binThen run:
These commands should now work:
|
Beta Was this translation helpful? Give feedback.
-
Your solution worked ! Thank you ! They never talked about the So if I need to execute some go code inside the bin directory I need to add it on my path right? So maybe I should do this then: export PATH=$PATH:/usr/local/go/bin:$(go env GOPATH)/bin` |
Beta Was this translation helpful? Give feedback.
-
I thought the official docs covered adding I did find this in my bookmarks: They cover updating
Or fully qualify the command when you run it, which would get annoying. :)
That looks like it would work to me. |
Beta Was this translation helpful? Give feedback.
What happens if you run:
$GOPATH/bin/staticcheck --version$(go env GOPATH)/bin/staticcheck --versionwhich staticcheck$GOPATH/binis not in your pathIt sounds like
$GOPATH/binis not in your path.A line like this at the bottom of your
~/.profilefile should resolve that:Then run:
source ~/.profilewithin your terminal (or log out and back in again) to set the updatedPATHvalue.These commands should now work:
which staticcheckstaticcheck --version