This is a creation in Article, where the information may have evolved or changed.
Go program mainly consists of the following parts:
Package Declaration
Importing packages
Function
Variable
Statements and expressions
Comments
An example of test20150525.go in one of these articles:
/* The first line defines a package. You must declare what package to run for the Go program. The main package is the starting point to run the program. Each package has a path and name associated with it. */package main/* Import "FMT" is a preprocessing command that tells the compiler to go to include files in the package fmt. */import "FMT"/* func main () primary function is the beginning of the execution of the program. */func Main () {//Note println method. In the Go language, a name if it starts with an uppercase letter for export. Export refers to a function or variable/common access to the corresponding package import. Fmt. Printf ("Hello world!\n God Bless you!"); }
Genesis 14:13 and there came one that had escaped, and told Abram the Hebrew; For he dwelt in the plain of Mamre the Amorite brother of Eshcol, and brother of Aner; and these were Confederate with ABR Am.