3 ms·
In Go, I create a struct with two properties: err and value. When err is set, it returns that, else returns the value. In the test, I create the fake and set it
by sethammons 4y ago
In Go, I create a struct with two properties: err and value. When err is set, it returns that, else returns the value. In the test, I create the fake and set its err to whatever and then verify handling. As needed, you can add properties and add a delay to the response if set.