TDD in Golang: Building a Stack from Scratch

Опубликовано: 17 Февраль 2026
на канале: The Engineering Coach
9,249
142

Welcome to the first Golang episode of The Engineering Coach! In this video, we'll introduce you to the power of Test-Driven Development (TDD) in a new language. You'll watch as we use TDD to build a Stack abstract data type in Golang, using the language's core testing package.

We'll follow the strict rules of the "Red, Green, Refactor" cycle:

1. Red: Write a failing test.
2. Green: Write just enough code to make the test pass.
3. Refactor: Clean up the code.

This video is a great introduction to the TDD mindset and shows how the same principles you've seen in our PHP videos apply to any language. If you're looking to learn how to write robust, well-designed code in Golang, this is the perfect place to start.

The code for this episode can be found on GitHub: https://github.com/testingallthething...

Let's Connect
For more software engineering tutorials and coaching, subscribe to The Engineering Coach on YouTube. You can also connect with me on Bluesky or Mastodon.

Mastodon: https://mastodon.social/@braddle
Bluesky: https://bsky.app/profile/braddle1.bsk...

#TDD #Golang #GoLang #TestDrivenDevelopment #SoftwareEngineering #TheEngineeringCoach #CodingCoach