~> brew info go@1.10 go@1.10: stable 1.10.8 (bottled) [keg-only] Go programming environment (1.10) https://golang.org Not installed From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/go@1.10.rb ==> Caveats go@1.10 is keg-only, which means it was not symlinked into /usr/local, because this is an alternate version of another formula. ... ~> brew install go@1.10
~> brew info go #可以發現這時候local端可以偵測到兩個版本 ... /usr/local/Cellar/go/1.10.8 (8,190 files, 337.0MB) * Poured from bottle on 2019-06-16 at 21:37:06 /usr/local/Cellar/go/1.12.6 (9,812 files, 452.7MB) Poured from bottle on 2019-06-16 at 18:38:23 ...
~> brew switch go 1.10.8 Cleaning /usr/local/Cellar/go/1.10.8 Cleaning /usr/local/Cellar/go/1.12.6 3 links created for /usr/local/Cellar/go/1.10.8 ~> go version go version go1.10.8 darwin/amd64 ~> go env GOARCH="amd64" ... GOHOSTOS="darwin" ... GOAPTH="/Users/babygoat/go" ... GOROOT="/usr/local/Cellar/go/1.10.8/libexec/go" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.10.8/libexec/go/pkg/tool/darwin_amd64"
~> brew switch go 1.12.6 Cleaning /usr/local/Cellar/go/1.10.8 Cleaning /usr/local/Cellar/go/1.12.6 3 links created for /usr/local/Cellar/go/1.12.6 ~> go version go version go1.12.6 darwin/amd64 ~> go env GOARCH="amd64" ... GOHOSTOS="darwin" ... GOAPTH="/Users/babygoat/go" ... GOROOT="/usr/local/Cellar/go/1.12.6/libexec/go" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.12.6/libexec/go/pkg/tool/darwin_amd64"