pascaldekloe / goe

enterprise tooling
Creative Commons Zero v1.0 Universal
13 stars 4 forks source link

Data exclusion for verify.Values #2

Open mikelangelon opened 8 years ago

mikelangelon commented 8 years ago

It would be super cool to have an exclude list for the verify function. Sometimes the match is gonna be between complex or deep structs and right now is mandatory to provide an exact struct match. Which is perfect plenty of times, but in some scenarios could be interesting to just care about specific values for the match.

Like, let's suppose that I'm expecting an struct like:

type PeriodCalc struct { Something string Blablabla string Value string Trace []*Log }

But maybe I don't care about this Trace array and I want just to ignore it and check the other variables.

pascaldekloe commented 8 years ago

Makes sense indeed. Maybe a (GoEL) exclusion list as a vararg would do. I'll give it a shot later this week...