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.