I was wondering if there is a generic way of unit testing the values of a rather large struct without having to write many if statements below each other. I know in Go we can use table-driven unit tests, but I have not yet found how we can implement this table-driven approach with structs.
My goal is to create a struct, do something with it, and unit test the new values of the struct. Does anybody know how I can achieve this with table-driven tests or if there's a better way to do it?