今天安裝gin框架,首先下載gin,命令如下:
go get github.com/mattn/go-sqlite3
結果報錯:
package golang.org/x/net/context: unrecognized import path "golang.org/x/net/context" (https fetch: Get https://golang.org/x/net/context?go-get=1: dial tcp 216.239.37.1:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)
操作的辦法就是:
|
1
2
3
4
|
$mkdir -p $GOPATH/src/golang.org/x/
$cd $GOPATH/src/golang.org/x/
$git clone https://github.com/golang/net.git net
$go install net
|
安裝了這個net包,然后再去安裝go-sqlite3,就安裝成功了。
