为什么go build ./每次重新运行某些项目会产生不同的结果?
例如:
$ cd go/src/github.com/google/cadvisor
$ go build ./
$ sh1sum cadvisor
cdfc3c38898e2decd5df35b661737f7cc4f514ed cadvisor
$ go build ./
$ sha1sum cadvisor
a94db96d684225e7a45cc68c5341fe6f57897c23 cadvisor
完全隔离设置:
$ go version
go version go1.6.2 linux/amd64
$ export GOPATH=$(mktemp -d)
$ cd $GOPATH
$ go get github.com/tools/godep
$ go get github.com/google/cadvisor
package github.com/influxdb/influxdb/client: code in directory /tmp/tmp.2MxFdNmdDe/src/github.com/influxdb/influxdb/client expects import "github.com/influxdata/influxdb/client"
$ cd src/github.com/google/cadvisor
$ $GOPATH/bin/godep restore
godep: WARNING: Go version (go1.6) & $GO15VENDOREXPERIMENT= wants to enable the vendor experiment, but disabling because a Godep workspace (Godeps/_workspace) exists
$ go build ./
...
一只名叫tom的猫
冉冉说
相关分类