Go Recipes: Practical Projects
1h 23mBeginner2023-10-17
Authors

Miki Tebeka
CEO at 353Solutions
Course details
If you’re figuring out what to make for dinner tonight, this course will not help you. However, if you’re learning the Go programming language, this course is a great resource for practical learning. Instructor Miki Tebeka walks you through common Go projects with "recipes," or step-by-step instructions. Miki shows you some basics, such as Go slices, maps, error handling, and panic recovery. He explains how to measure, format, parse, and convert time in Go. Miki goes over ways you can work with text in Go, then demonstrates using structs, methods, and interfaces to improve your code. He discusses working with JSON and HTTP, then concludes by describing the benefits of bringing concurrent instructions to your apps.
Skills covered
GoGoogleProgramming LanguagesSoftware DevelopmentOne-Off
Concepts
Introduction
- Recipes for practical projects with Go
- What you should know
The Basics
- Working with numbers in Go
- Go slices
- Working with maps in Go
- Go error handling
- Using defer to manage resources
- Go panic recovery
- Challenge - Writing a filter
- Solution - Writing a filter
Working with Time
- Time arithmetic
- Measuring time
- Formatting time
- Parsing time
- Time zone conversion
- Challenge - Time
- Solution - Time
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
Structs, Methods, and Interfaces
- Go structs
- Go methods
- Go interfaces
- The empty interface
- Working with iota in Go
- Structs, methods, and interfaces
- Challenge - Structs, methods, and interfaces
- Solution - Structs, methods, and interfaces
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
HTTP
- HTTP calls in Go
- Authentication with Go
- Writing an HTTP server in Go
- REST with gorilla mux
- Challenge - HTTP
- Solution - HTTP
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
Conclusion
- Next steps