Go Table-Driven Testing
Table-driven tests express multiple inputs and expected outputs as data, then run a shared assertion body for each case. Subtests give each case a clear name and make failures easy to isolate.
Declarative test cases, subtests, and idiomatic use of the testing package.