Concurrency
goroutines
the basic unit of concurrency in goanonymous functions
- don't need name
- can be called as their defined
- used to start each of the concurrent processes
channels
help organize and control the communication between the different processes- helps avoid race conditions
channel <- data
orx :=channel
- send statements to control the direction data moves in channels
go test -bench="."
to benchmark testsgo test -race
check fo race conditions
quotes
Make it work, make it right, make it fast - Kent Beck
premature optimization is the root of all evil - Donald Knuth