Recommendations for Learning Test-Driven Development (TDD) in Go?

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • gobyexample

    Go by Example

    https://gobyexample.com/ - Learn the syntax https://exercism.org/tracks/go/ - Practice simple problems to solidify syntax https://gophercises.com/ - Build projects to gain confidence with Go https://quii.gitbook.io/learn-go-with-tests/ - Learn TDD in Go I'm planning to go through the Gophercises projects again and practice building them from scratch using TDD. However, I'm curious if any of you have other recommendations for resources to learn TDD in Go. I would greatly appreciate any advice or insights you have to offer!

  • ginkgo

    A Modern Testing Framework for Go

    A bit off-topic, but i really like the ginkgo BDD framework

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • go-timejumper

    Time as a dependency, very useful for testing

    Write a test. Then write the implementation. If you find it hard to test, because your test needs to know too much about the implementation, or impossible to test because of side effects, iterate by injecting dependencies. Time itself could be a dependency. I wrote https://github.com/ghostsquad/go-timejumper just for that purpose (as an example).

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts