New 42-day free trial Get it now
Smarty

Testing in Go by Example: Part 6

Smarty header pin graphic
Updated October 29, 2025
Tags
Smarty header pin graphic

For this installment of the Testing in Go series we'll be talking about a grouping of packages that facilitate general-purpose comparisons in various contexts. Since the most common context is testing it seemed like this series was the right place for the discussion.

We generally refer to these comparison functions as assertions (cue ominous background music and spooky sound effects). You may have already read the opinions found on the Golang FAQ related to assertions.

"Why does Go not have assertions?"

Go doesn't provide assertions. They are undeniably convenient, but our experience has been that programmers use them as a crutch to avoid thinking about proper error handling and reporting. Proper error handling means that servers continue operation after non-fatal errors instead of crashing...

"Where is my favorite helper function for testing?"

Go's standard testing package makes it easy to write unit tests, but it lacks features provided in other language's testing frameworks such as assertion functions. An earlier section of this document explained why Go doesn't have assertions, and the same arguments apply to the use of assert in tests.

In general, we agree that in many scenarios, a single assertion failure shouldn't prevent a test from running. So, by default, the assertion functions we use don't do that. Problem solved.

Subscribe to our blog!
Learn more about RSS feeds here.
Read our recent posts
Smarty customers avoid USPS rate limiting
Arrow Icon
TLDR: Smarty customers won’t feel a thing from the new USPS API restrictions because Smarty doesn’t depend on USPS’s real-time APIs to do address verification. We’ve always used our own, powerful, hyper-accurate data to back our tools and support client needs. While USPS is capping its address verification service at 60 requests per hour and retiring the legacy Web Tools API on January 25, Smarty keeps verifying addresses at full speed on our own infrastructure. We ingest USPS data updates monthly and run verification internally, so USPS API changes, rate limits, or even a temporary USPS outage don’t ripple into your workflows.
Provider data accuracy: Regulatory compliance and hidden network risks
Arrow Icon
Welcome to part one of our new blog series on provider location data—an exploration into the messy, high-stakes world of healthcare compliance, address accuracy, and network adequacy. To kick things off, we sat down with Dave Medlock, founder of Maven One Health and a contributing thought leader, to discuss why clean provider data is essential for achieving peak regulatory compliance and meeting requirements with ease, thereby avoiding serious consequences if it isn’t done correctly. Here’s what he had to say about understanding CMS, state DOIs, continuous audits, rosters, data decay, messy inputs, and the future of address data itself.
Always on; always Smarty: High availability design and engineering best practices
Arrow Icon
When the digital world falters, our goal is simple: stay steady for our customers. At Smarty, reliability isn’t a bragging point, but rather a promise. We’ve built a platform designed to keep running even when others stop, using a vendor-agnostic, redundant infrastructure grounded in engineering best practices that weather disruptions with quiet consistency. Our customers depend on uninterrupted address data services. And, we take that trust seriously. And because we trust you, we’re offering a 42-day free trial on every product.

Ready to get started?