Skip to content
Johnny Boursiquot edited this page Mar 18, 2024 · 11 revisions

ℹ️ Go in 3 Weeks: Writing idiomatic and production-grade Go. is a live online training offered through O'Reilly Learning.

❗ This training material was designed for a guided walkthrough by the instructor and is best consumed along with the video recording of the training.

About this training

You’ve done some tutorials, read a few blog posts, watched a few videos, and even did some small projects. Now it’s time to level up your Go.

In this training, you’ll reinforce the basics before honing advanced techniques with an idiomatic approach to the language. Along the way, you’ll learn best practices for project layout, testing, reusability, and dependency management. You'll learn how to use the Go toolchain, build CLI tools, and write robust HTTP servers and clients. You'll understand good package design and error handling strategies. You'll see how to leverage the powerful Go standard library for common needs and manage external dependencies effectively when you need them. Lastly, you'll dive into Go’s concurrency primitives, techniques, and patterns.

By the time you’re through, you’ll know what production-grade Go code should look like and be able to apply those techniques to your own projects with confidence.

What you'll learn and how you can apply it

Week 1: Fundamentals, Building Tools, Testing, and Interfaces

  • Foundational Go concepts, features, and language syntax
  • How to build robust command-line tools
  • How to write more testable code with interfaces and advanced testing techniques
  • How to use the Go toolchain to build and test your programs
  • Use pointers, structs, and methods
  • Understand parametric polymorphism (Generics)
  • Build a simple command-line tool that performs I/O and pulls in its configuration from the environment
  • Test your code by mocking remote services

Week 2: HTTP Servers and Modules for Dependency Management

  • Must-have foundational knowledge of how HTTP works in the Go standard library
  • How to build resilient servers that can withstand flaky clients
  • How to write robust clients that can handle throttling and backoff
  • Write robust clients that can handle throttling, make use of context propagation, and more
  • Write robust servers that can handle intermittent disconnects and long requests effectively
  • Dependency management with Go modules
  • Create a module and use it in your code
  • Upgrade and release your module updates without breaking code that relies on it

Week 3: Concurrency

  • Go concurrency concepts
  • How to use goroutines, channels, and mutexes
  • How to handle communication between goroutines
  • How to write concurrent code that is testable
  • How to leverage patterns that allow you to write efficient and safe concurrent Go
  • Leverage goroutines and channels to synchronize access to a shared resource
  • Solve “embarrassingly parallel” problems using Go concurrency techniques

This training course is for you because...

  • You want to explore common use cases for Go that you might encounter on the job.
  • You’re somewhat new to Go and want to know how to write idiomatic and production-grade code.
  • You want to embark on new Go projects or tackle existing ones with confidence.

Prerequisites

  • A computer with Go 1.22+ installed and configured
  • An introductory-level knowledge of Go
  • Programming experience in another language
  • Familiarity working in a terminal

Editor options

Recommended preparation:

Recommended follow-up:

About the Instructor

Guiding you through this journey will be Johnny Boursiquot, veteran Go trainer and active member of the Go community. He is a GopherCon Chair, runs the Baltimore Metro Area Go User Group, leads the Baltimore Chapter of the GoBridge organization, and speaks regularly at conferences and meetups. He loves to teach and welcome new members into the community. Reach him on Twitter @jboursiquot.