go 1.12之后 GO111MODULE=auto默认为这个,只要不在GOPATH/src下面
mkdir akin
vi demo.go
package main
import "github.com/astaxie/beego"
func main() {
beego.Run()
}
初始化:
go mod init akin
go run demo.go //就可以运行
如果在国内,可能上步不成功,可以使用
export GOPROXY=
go run demo.go //再运行试一下,应该没问题
-
[root@FH21_TestServer akin]# go run demo.go
-
go: finding github.com/astaxie/beego v1.11.1
-
go: downloading github.com/astaxie/beego v1.11.1
-
go: extracting github.com/astaxie/beego v1.11.1
-
go: finding github.com/siddontang/go v0.0.0-20180604090527-bdc77568d726
-
go: finding github.com/belogik/goes v0.0.0-20151229125003-e54d722c3aff
-
go: finding github.com/gomodule/redigo v2.0.0+incompatible
-
go: finding github.com/pkg/errors v0.8.0
-
go: finding github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542
-
go: finding github.com/lib/pq v1.0.0
-
go: finding github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd
-
go: finding github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76
-
go: finding github.com/Knetic/govaluate v3.0.0+incompatible
-
go: finding github.com/casbin/casbin v1.7.0
-
go: finding github.com/pelletier/go-toml v1.2.0
-
go: finding github.com/elazarl/go-bindata-assetfs v1.0.0
-
go: finding github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b
-
go: finding github.com/couchbase/gomemcached v0.0.0-20181122193126-5125a94a666c
-
go: finding golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85
-
go: finding github.com/go-redis/redis v6.14.2+incompatible
-
go: finding github.com/go-sql-driver/mysql v1.4.1
-
go: finding github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d
-
go: finding github.com/gogo/protobuf v1.1.1
-
go: finding gopkg.in/yaml.v2 v2.2.1
-
go: finding github.com/couchbase/go-couchbase v0.0.0-20181122212707-3e9b6e1258bb
-
go: finding github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c
-
go: finding github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec
-
go: finding github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712
-
go: finding github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737
-
go: finding github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58
-
go: finding github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a
-
go: finding github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db
-
go: finding gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
-
go: finding github.com/mattn/go-sqlite3 v1.10.0
-
go: finding github.com/siddontang/ledisdb v0.0.0-20181029004158-becf5f38d373
-
go: finding golang.org/x/net v0.0.0-20181114220301-adae6a3d119a
-
go: downloading golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85
-
go: downloading gopkg.in/yaml.v2 v2.2.1
-
go: extracting gopkg.in/yaml.v2 v2.2.1
-
go: extracting golang.org/x/crypto v0.0.0-20181127143415-eb0de9b17e85
-
2019/05/13 10:41:10.301 [I] http server Running on
阅读(6011) | 评论(0) | 转发(0) |