Introduction

Gopher


What Is Go?

You don’t know Go, yet. Neither do I, not fully anyway. None of us do. But we can all start getting to know Go better.

About the Book

Go programming language study notes turned book.

This book is inspired by ‘You Don’t Know JS Yet’ (YDKJS) book series. YDKJS helped me understand JavaScript under the hood, after more than 8 years writing software in JS.

You Don’t Know Go (YDKGo) book is based on Ultimate Go training, which is an intermediate-level class for engineers with some experience with Go trying to dig deeper into the language.


Table of Contents

Lesson 1: Design Guidelines [ guide]

Language Mechanics

Lesson 2: Language Syntax

Lesson 3: Data Structures

Lesson 4: Decoupling

Software Design [ guide]

Lesson 5: Composition [ guide | exercise 1 solution]

Lesson 6: Error Handling [ guide | exercise solution: 1 | 2]

Lesson 7: Packaging

  • Language Mechanics [ guide]
  • Design Guidelines [ guide]
  • Package-Oriented Design [ guide]

Concurrency [ guide]

Lesson 8: Mechanics - Goroutines [ guide | exercise 1 solution]

Lesson 9: Mechanics - Data Races [ guide | exercise 1 solution]

Lesson 10: Mechanics - Channels [ guide | exercise solution: 1 | 2 | 3 | 4]

Lesson 11: Concurreny Patterns

Testing and Profiling [ guide]

Lesson 12: Testing [ guide]

Lesson 13: Benchmarking [ guide | exercise 1 solution]

Lesson 14: Profiling and Tracing

  • Profiling Guidelines [ guide]
  • Stack Traces [code example: 1 | 2 | 3]
  • Micro Level Optimization using Benchmarks [ code example]
  • Macro Level Optimization
    • Part 1: GODEBUG Tracing [code example: 1 | 2]
    • Part 2: Memory Profiling [code example: 1 | 2]
    • Part 3: Tooling Changes
    • Part 4: CPU Profiling [ code example]
  • Execution Tracing [ code example]

Extra Lesson

  • Advanced Performance and Benchmarking [ guide]
  • Fuzzing [ guide]

License

This book contains a variety of content; some developed by Cedric Chee, and some from third-parties. The third-party content is distributed under the license provided by those parties.

The content of this project itself is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, and the underlying source code used to format and display that content is licensed under the Apache License, Version 2.0.

The Go gopher was designed by Renee French, is licensed under Creative Commons 3.0 Attributions.

Gopher picture by Maria Letta.