github.com/gagliardetto/golang-go@v0.0.0-20201020153340-53909ea70814/cmd/go/testdata/script/install_cross_gobin.txt (about) 1 env GO111MODULE=off 2 [!short] skip # rebuilds std for alternate architecture 3 4 cd mycmd 5 go build mycmd 6 7 # cross-compile install with implicit GOBIN=$GOPATH/bin can make subdirectory 8 env GOARCH=386 9 [386] env GOARCH=amd64 10 env GOOS=linux 11 go install mycmd 12 exists $GOPATH/bin/linux_$GOARCH/mycmd 13 14 # cross-compile install with explicit GOBIN cannot make subdirectory 15 env GOBIN=$WORK/bin 16 ! go install mycmd 17 ! exists $GOBIN/linux_$GOARCH 18 19 # installing standard command should still work 20 # (should also be mtime update only if cmd/pack is up-to-date). 21 ! stale cmd/pack 22 [!short] go install cmd/pack 23 24 -- mycmd/x.go -- 25 package main 26 func main() {}