Introduction
Recipes for practical projects with Go
()
What you should know
()
1. The Basics
Go error handling
()
Working with numbers in Go
()
Go slices
()
Working with maps in Go
()
Using defer to manage resources
()
Go panic recovery
()
Challenge: Writing a filter
()
Solution: Writing a filter
()
2. Working with Time
Time arithmetic
()
Measuring time
()
Formatting time
()
Parsing time
()
Time zone conversion
()
Challenge: Time
()
Solution: Time
()
3. Working with Text
Go string formatting
()
Working with Unicode in Go
()
Case insensitive comparisons in Go
()
Go regular expressions
()
Reading text files with Go
()
Challenge: Text
()
Solution: Text
()
4. Structs, Methods, and Interfaces
Structs, methods, and interfaces
()
Go structs
()
Go methods
()
Go interfaces
()
The empty interface
()
Working with iota in Go
()
Challenge: Structs, methods, and interfaces
()
Solution: Structs, methods, and interfaces
()
5. Working with JSON
Unmarshalling JSON with Go
()
Parsing complex JSON with Go
()
Marshalling JSON with Go
()
Dealing with zero and missing values in Go
()
Using mapstructure to handle arbitrary JSON
()
Challenge: JSON
()
Solution: JSON
()
6. HTTP
HTTP calls in Go
()
Authentication with Go
()
Writing an HTTP server in Go
()
REST with gorilla/mux
()
Challenge: HTTP
()
Solution: HTTP
()
7. Concurrency
Converting sequential code to concurrent in Go
()
Timeouts in Go
()
sync.WaitGroup
()
sync.Once
()
Using a pool of goroutines
()
sync/atomic
()
Challenge: Concurrency
()
Solution: Concurrency
()