/article-testable-code-go

This repository contains the sources for an article I wrote about some techniques and tips on how to write testable code in Go

Primary LanguageGoOtherNOASSERTION

Testable code example

This repository contains the code for an article I wrote about how to write testable code in Go. The purpose of the article is to demonstrate some techniques I use and I consider being a good addition to your skillset to write testable code more easily.

Hope you enjoy it:

Usage

Simple:

go test -v -cover ./...

Disclaimer

This is my ways of doing things, I'v been using them both professionally and personally and it proved to be a good way of testing. The purpose of the article is to simply demonstrate how it can be done and demonstrate the efficiency of it and in any case it is stating that this is the only valid way of doing so.

Us, developers, we all have our ways and what matters it to pick the right tools for the job including testing.