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 |