The commands go build
and go install
compile the files into binaries. Does go run
compile or interpret the file? I couldn\'t find expl
Command go run
performs project's building under the hood (so yes it builds project)
and with flag --work (go run --work main.go
) you can see the location of temporary build files.
Also in official documentation (go1.11
) you can find:
go run
- compiles and runs the named main Go package.
go build
- compiles the packages named by the import paths,
along with their dependencies, but it does not install the results.
go install
- compiles and installs the packages named by the import paths.