Summary
- Packages are collections of related functions and code.
- It is necessary to import a package before you can use its functions within a Go file.
- Usually, strings represent text characters as a series of bytes.
- An individual text character is represented by a rune.
- There are two most common numeric types in Go: int, which holds integers, and float64, which holds floating-point numbers.
- A bool type holds true or false Boolean values.
- Variables are pieces of storage that can store values of a specific type.
- Variables will contain zero values if no value is assigned to them.
- The := short variable declaration allows you to declare a variable and assign a value at the same time.
- The name of a variable, function, or type must begin with a capital letter in order to be accessed from other packages.
- The Go fmt command automatically formats source files according to Go standard formatting.
- The go build command compiles Go source code into a binary format that computers can execute.
- Using the go run command, a program is compiled and run without saving an executable file.