4. 4
いっちょやってみっか!
go get github.com/xxxxx/xxxxx
$ go get github.com/syossan27/kirimori
package github.com/syossan27/kirimori:
cannot download, $GOPATH not set. For
more details see: go help gopath
5. 5
いっちょやってみっか!
go get github.com/xxxxx/xxxxx
$ go get github.com/syossan27/kirimori
package github.com/syossan27/kirimori:
cannot download, $GOPATH not set. For
more details see: go help gopath
14. 14
どういう人が悩まされる??
各OSのGo言語のバージョン状況(2018/04/17現在)
$ brew install go
$ go version
go version go1.10.1 darwin/amd64
http://formulae.brew.sh/formula/go
Mac
https://chocolatey.org/packages/golang
Windows
$ choco install golang
$ go version
go version go1.10.1 windows/amd64
24. 24
マジでした
Mac
$ go run test.go
os.Getenv("GOPATH"):
build.Default.GOPATH: /home/blue-goheimochi/go
$GOPATH設定前
$GOPATH設定後
$ go run test.go
os.Getenv("GOPATH"): /home/blue-goheimochi/go
build.Default.GOPATH: /home/blue-goheimochi/go
25. 25
マジでした
Windows
$ go run test.go
os.Getenv("GOPATH") :
build.Default.GOPATH : C:¥Users¥blue-goheimochi¥go
$GOPATH設定前
$GOPATH設定後
$ go run test.go
os.Getenv("GOPATH") : C:¥Users¥blue-goheimochi¥go
build.Default.GOPATH : C:¥Users¥blue-goheimochi¥go
26. 26
マジでした
Ubuntu 16.04、Ubuntu 14.04
$ go run test.go
os.Getenv("GOPATH") :
build.Default.GOPATH :
$GOPATH設定前
$GOPATH設定後
$ go run test.go
os.Getenv("GOPATH"): /home/blue-goheimochi/go
build.Default.GOPATH: /home/blue-goheimochi/go
27. 27
マジでした
CentOS 7
$ go run test.go
os.Getenv("GOPATH") :
build.Default.GOPATH : /home/blue-goheimochi/go
$GOPATH設定前
$GOPATH設定後
$ go run test.go
os.Getenv("GOPATH") : /home/blue-goheimochi/go
build.Default.GOPATH : /home/blue-goheimochi/go