This is a created article in which the information may have evolved or changed.
Go Run hello.go
Directly compiles, links and runs together as a single step, and will not see any intermediate files and executables after the run is complete.
You can use the Go Build command to generate only compilation results and not run automatically:
Go Build Hello.go
After running, you will see the. exe file in the program directory after you finish executing the Go Build command, you can install the successful package in a specific directory.
Go Install
When compared to the build command, the install command installs the executable file or library file into the agreed directory after compiling the source code.
Go install compiles the executable file named after its directory name (DIR)
Go install installs the executable file in the bin directory with the SRC peer, and the bin directory is created automatically by go install
Go install compiles the various package that the executable depends on and places it in the PKG directory at the same level as the SRC
Go Install Project
Remote Import Support
When importing a non-local package, you can use the go get command to get the remote package:
Go get url/pkg