Mỗi file Go thuộc 1 package (package main). main package + func main() = entry point.
- Import:
import "fmt"hoặc grouped import. - Exported names (public) viết hoa chữ cái đầu:
fmt.Println. - Lowercase = unexported (private trong package).
Every Go file belongs to one package (package main).
- The
mainpackage withfunc main()is the program entry point. - Imports:
import "fmt"or grouped imports. - Exported (public) identifiers start with a capital letter:
fmt.Println. - Lowercase identifiers are unexported (package-private).