To initialise go project, run go mod <name-of-your-project>
To run go file, run go run <filename>.go
Go is a strongly and statically typed language
Go uses goruntime in executable
it uses goruntime to cleanup unused memory at runtime
- Go has different types of numbers (ints, floats, complex).
- I can change types of those numbers
- Different types of numbers take more or less space
By defualt, stick to the following primitive types unless you have a very good reason:
-
bool
-
string
-
int
-
uint
-
byte
-
rune
-
float64
-
complex128
-
Variables
- const can be used for primitive types
- const doesn’t work with maps and slices
- constants can be dynamic if the change happens while compiling code
Go Modules
Go String Formatting
Go Interfaces
Go Errors
Go Loops
Go Array and Slice
Variadic function
Go Map
Go Channels
Dependencies in Go
Go Routine
Go Channels
Useful Libraries and Packages
Air - Live reload for Go
Chi - Go Router that uses stdlib Go http package