Simple Go project, with a external dependence:
import (
"fmt"
"html"
"log"
"net/http"
"github.com/gorilla/mux"
)
My path working fine for other tasks like run, build, etc.:
GOPATH="/home/racar/go"
But when I try to get a external package with "go get" command, I got this error:
"go install: no install location for directory... outside GOPATH"
Edit:
I have set my PATH in ~/.bashrc: export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
According with this link: github.com/golang/go/wiki/SettingGOPATH
Is needed to set GOBIN path in bash file: export GOBIN=$GOPATH/bin
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