Re:Too Much Go Misdirection
by dgb23 on Tuesday May 20, 2025 @01:08PM
(#44043725)
Plain data is really convenient for testing though.
I think the reason that your example is so useful is not generally because of testing, but because the thing you're interacting with has operational semantics. It's a good use case for object orientation, so interfaces and mocking are the natural way of testing your logic.
I think the reason that your example is so useful is not generally because of testing, but because the thing you're interacting with has operational semantics. It's a good use case for object orientation, so interfaces and mocking are the natural way of testing your logic.