A pattern for Go tests

A deconstructed ship — Deutsches Technikmuseum, Berlin

I googled test patterns in Go.

Then, I invoked the Spirits of the Core Library.

What I found

  • the description of the case
  • the input
  • a slice of checkFunc carrying the expectations.

TDD or BDD, the choice is yours

--

--

--

Test-driven backend engineer. Cryptography consumer. Berlin, Europe.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Are Mobile Simulators Going to Be The Next REAL DEAL?

Create ASP.NET Core Web API project in Visual Studio Code(VS Code) — part 1

Soft test network engineer preparation materials (1)

Azure for Beginners — Add Users to Azure SQL Database

[Reverse Engineering Tips] — Enumerators

Email to Flow in Salesforce

How CI/CD took my Developer-Customer’s Relationship to the Next Level?

Collaboration & Integrated approach challenges in SCM

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pierre Prinetti

Pierre Prinetti

Test-driven backend engineer. Cryptography consumer. Berlin, Europe.

More from Medium

Introduction to gRPC

Evolution of Distributed Systems

Advanced Redis Security — Redis Roadmap

gRPC proto files Best Practices