This is a created article in which the information may have evolved or changed.
1. Configure Environment variables
2. Instructions and documentation for local reading of the newspaper do not FQ
Window+r appears black window execution godoc-http:8080
In the local browser localhost:8080 enter
3 multi-line Comment/**/
4 keyword 25
Const PI = 3.14//Declaration of constants
Type NewType//general type
var name = "Gopher"//Declaration of global variables
Structure Declaration
Type gopher struct {}
Interface
Type Golang interface{}
5. Tips for guiding the package
Import (
"FMT"
"OS"
)
6 Hello world!
Package Main
Func Main () {
Fmt. Println ("Hello world!")
}
7. Using an ellipsis call or alias cannot exist simultaneously
<1 using aliases
<2
8. Case
Uppercase public can be called
lowercase equals private
Three types and variables
The variable group function cannot be declared!
such as VAR (
...
)
Unint8 byte 0-255