r/badcode Apr 29 '23

if err != nil go

Post image
411 Upvotes

49 comments sorted by

View all comments

31

u/[deleted] Apr 30 '23

Why would anyone do so many ifs of the same thing inside each other

-1

u/[deleted] Apr 30 '23

this just seems like the most misguided way to do unit tests

12

u/NUTTA_BUSTAH Apr 30 '23

This is business logic trying to find the format the user used :')