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.
A package tree after go build and go install:
.
├── bin
│ └── hello # by go install
└── src
└── hello
├── hello # by go build
└── hello.go
More detailed information.