I found this course on a website called Lynda.com (some of you probably know about this website).
The course was called: Code Clinic: Go
. So, I'm using something called Go
or Golang
and I downloaded this command program called Git Shell
, and whenever I execute a Go Command, I get this message:
bash: go : command not found
Does anybody know what's going on?
You have to put the Go executable in your PATH:
1) cd ~
2) vi .bashrc
3) Inside .bashrc, enter the following: PATH=$PATH:/c/Go/bin
Restart git bash and you should now have the go
command
You need to set GOPATH environment variable with the path of your GO installation directory.
For example if your Go installation directory is C:\Go
Open a bash terminal and run the following:
GOPATH=/c/Go/bin
Then type go version
to check if it works
you should see the go version you installed
The Go compiler is not part of Git Bash; you need to install it separately.
See the download page on http://golang.org/; for Windows, one of the MSI installers is most likely to be appropriate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With