Go Language Command Introduction

Source: Internet
Author: User
This is a created article in which the information may have evolved or changed.

Go language-related commands:

  1. Bulid command:

    1. Compiling the file or code package, compiling the command source file generates executable code, and compiling the library file does not produce results.

    2. -A flag: Force compilation of all involved code packages

  2. Run command:
    1. Run the command source file (compile and run first)
    2. Parameter can only have one command source file
    3. -N flag: Prints the commands that are required to run during compilation, but does not actually execute them.
    4. -P N Tag: Parallel compilation, n is number.
    5. -V flag: Lists the names of the code packages that were compiled.
    6. -a-v tag: Lists the names of all compiled code packages.
    7. -work tag: Displays the path of the temporary working directory created at compile time without deleting it.
    8. The-X tag: Prints the commands that are needed to run the compilation process, and actually executes them.
  3. Install Command:
    1. Compile and install the file, the executable file is placed in the $gobin directory, the code package will be installed in the PKG related directory.
    2. When you take a file as a parameter, only those files are compiled and installed.
    3. These code packages and their dependencies are installed when the code package path is a parameter.
  4. Get command:
    1. Download and install the code package from the remote code warehouse.
    2. -d flag: Download only, not install.
    3. -fix tag: Perform the fix before compiling the installation.
    4. -U flag: Updates the local code.

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.