标签:图片 最新版 因此 信息 info 就是 base pack ranch
Golang 设计深受 Google 主干开发模型影响:
// hello.go package main import "bitbucket.org/bigwhite/c" func main() { c.CallC() }
在 ~/test/hello 下创建 go.mod:
// go.mod module hello
$ go build hello.go go: finding bitbucket.org/bigwhite/c v1.3.0 go: downloading bitbucket.org/bigwhite/c v1.3.0 go: extracting bitbucket.org/bigwhite/c v1.3.0 go: finding bitbucket.org/bigwhite/d v1.2.0 go: downloading bitbucket.org/bigwhite/d v1.2.0 go: extracting bitbucket.org/bigwhite/d v1.2.0 $ ./hello.exe call C: v1.3.0 --> call D: call D: v1.2.0 --> call D end
$ cat go.mod // go.mod module hello go 1.12 require bitbucket.org/bigwhite/c v1.3.0 // indirect
$ pwd /e/Coding/Golang/go/pkg/mod/cache/download $ ls bitbucket.org/ github.com/ golang.org/ gopkg.in/ sigs.k8s.io/ cloud.google.com/ go.uber.org/ google.golang.org/ k8s.io/
具体执行:
$ ./hello.exe call C: v1.3.0 --> call D: call D: v1.2.0 --> call D end
标签:图片 最新版 因此 信息 info 就是 base pack ranch
原文地址:https://www.cnblogs.com/wangao1236/p/11002871.html