A hands-on guide for proper Unit Testing in Go!

Опубликовано: 09 Май 2026
на канале: Flo Woelki
29,622
663

Unit testing is an essential part of scaling an application and getting a good night's sleep. This video contains explanations that include Structs, if you need a refresher what structs are, check out this video:    • This is your last video about Golang Structs!  


📝 Description
In this video, we're diving deep into the world of unit testing in Golang. Whether you're building scalable applications or robust libraries, testing is a crucial part of the development process. Today, we'll focus specifically on implementing unit tests in Go.
By the end of this video, you'll have a solid understanding of how to write and structure unit tests in Go, ensuring your code is reliable and maintainable. Plus, you'll get hands-on experience with practical examples and best practices.


⏳ Timestamps:
00:00 - Introduction
00:38 - Code we are going to test
01:42 - Restructuring the code
03:58 - Writing the Unit Tests
14:52 - Test Coverage
18:19 - Outro


👋 Hey there!
If you are new to this channel: Hey 👋 my name is Flo and I am a professional software engineer with a passion for coding in Golang, TypeScript, JavaScript, and Rust. This channel is where I share that passion and dive into the exciting world of software engineering. Plus, I love using emojis and paper-based animations (so have a look for that if you want to find my videos).


📨 Support and Connect!
Become a member.    / @flowoelki  
Discord:   / discord  
X / Twitter: https://x.com/FlorianWoelki
LinkedIn:   / florian-woelki  
GitHub: https://github.com/FlorianWoelki


📝 Copyright Notice
The original Go Gopher was designed by Renée French (Source: https://go.dev/blog/gopher License details: https://creativecommons.org/licenses/.... The gopher appearing in this video and thumbnail is modified from the original design.


#golang #go #unittesting #unittests