I\'m trying to install a web.go
, but running go get github.com/hoisie/web
returns
package bufio: unrecognized import path \"bufio\"
Because GFW forbidden you to access golang.org ! And when i use the proxy , it can work well.
you can look at the information using command
go get -v -u golang.org/x/oauth2
The most common causes are:
1. An incorrectly configured GOROOT
OR
2. GOPATH is not set
I had the same problem on MacOS 10.10. And I found that the problem caused by OhMyZsh shell. Then I switched back to bash everything went ok.
Here is my go env
bash-3.2$ go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/bis/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1