The docs say nothing about what build vs install does
My expectation was that it\'s like make install; i.e. it takes the compiled
go build vs go install:
go buildjust compiles the executable file and moves it to the destination.go installdoes a little bit more. It moves the executable file to$GOPATH/binand caches all non-main packages which are imported to$GOPATH/pkg. The cache will be used during the next compilation provided the source did not change yet.
go build and go install:.
├── bin
│ └── hello # by go install
└── src
└── hello
├── hello # by go build
└── hello.go
More detailed information.