Go day 2

53 阅读1分钟

Go code is grouped into packages, and packages are grouped into modules.

In Go, a function whose name starts with a capital letter can be called by a function not in the same package. This is known in Go as an exported name.

image.png

In Go, the := operator is a shortcut for declaring and initializing a variable in one line

Declare a main package. In Go, code executed as an application must be in a main package.