Go Notes
Parts of Go
Getting started
Syntax
Concepts
Language characteristics
- Statically typed: makes it easier to catch errors at compile time
- C-inspired syntax: familiar to many developers, not familiair with it myself
- Garbage collected: makes building anything a lot faster
- Compiled: tends to be faster than interpreted languages
- Cross platform: can be developed and compiled to run on any platform
- Rapid compilation: compiles quickly, making it easy to iterate on code
- Single binary output: easy to deploy and distribute (espec in containerized environments)
Guiding principles
- Simplicity: for example, there is one way to iterate over a collection. Garbage collection is one of those characterisitcs that makes Go simple to use.
- Commitment to backward compatibility: Go 1.0 code should still compile and run. Also, with a C-inspired syntax, it is easy to read and understand code written by others.
- Made for concurrent, network enabled applications. The single binary output helps easy deployment and distribution of these applications.
- Holistic apporach: Go toolchain contains everything you need to develop in Go
Packages
Packages are the building blocks of Go.