Three ways to execute the GO program and go language keywords

Source: Internet
Author: User

Three ways to execute the GO program and go language keywords

Three ways to execute a Go program

I. Use of go run commands

Ii. Use of go build commands

Step1. Executes a command on the go source file go build , generating an executable with the same name. exe

Step2. Executing the. exe executable file

Third, on-line compilation run

Compile and run using the online tool of the official website: https://play.golang.org

Keywords in the Go language

Go language Keywords

Break Default Func Interface Select
Case Defer Go Map struct
Chan Else Goto Package Switch
Const Fallthrough If Range Type
Continue For Import Return Var

In addition to the keywords above, the Go language also has 36 predefined identifiers

Append bool Byte Cap Close Complex Complex64 complex128 UInt16
Copy False Float32 Float64 Imag Int int8 Int16 UInt32
Int32 Int64 Iota Len Make New Nil Panic UInt64
print println real recover string true uint uint8 uintptr
Related Article

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.