Can Gomega support verification of multiple return values of different types where the last one is not `error`?


For instance:
If I have a wrapper for
with the same method signature:

func Load(key string) (value interface{}, ok bool)

in Can Gomega's Equal() handle multiple values ? similar question was asked and the response is to put the return values into single data structure. If that is the case, what if I don’t want to adapt the (production) code based on this limitation of the unit test framework?


Can be done in several lines.

        value, ok := m.Load(key)

Answered By – user892960

Answer Checked By – Mary Flores (GoLangFix Volunteer)

Leave a Reply

Your email address will not be published.