This is a creation in Article, where the information may have evolved or changed.
"Go structs, slices, maps"
1, when defined * After the variable name, when used * in front of the variable name.
2, the definition struct,type before, the struct keyword after.
3. The pointer can specify a struct.
4, a struct literal denotes a newly allocated struct value by listing the values of their fields.
You can list just a subset of fields by using the Name: syntax. (and the order of named fields is irrelevant.)
5, the array definition.
6, A slice points to an array of values and also includes A length.
[]Tis a slice with elements of type T .
7. Slices can re-sliced, creating a new slice value that points to the same array.
[A, b] takes a value interval of a->b-1.
8, Making slices
9. The zero value of a slice is nil .
A nil slice has a length and capacity of 0.
For the above formula, Z is nil.
10. Add elements through the Append method.
11. Range can be used to iterate slices in for.
12, through _ can omit the index.
13. Maps must is created with make (not new ) before use
14, Map literals is like a struct literals, but the keys is required.
15, can omit vertex. If the top-level type is just a type name, you can omit it from the elements of the literal.
16. Operation of Map
17, the function is also a variable.
18, closure.
Reference: HTTPS://TOUR.GOLANG.ORG/MORETYPES/1