Go command line

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.