If I need to fake something out,  I generally write a little mock type from
scratch. If there are a bunch of methods that are required for the
interface type but I know will never be called, then there's always the
neat trick of embedding a value of the required interface type inside a
struct type that implements  the method you care about.

This can be particularly useful for large  interface types.

On 17 Feb 2017 18:22, <[email protected]> wrote:

Just curious if anyone is planning to update golang/mock (
https://github.com/golang/mock), since it has a bunch of open PRs and
hasn't had a commit since Jan. 2016.

Or maybe it's not a preferred tool in the Golang community anymore? Is
there some other tool that folks recommend for mocking HTTP, databases,
etc.?

Marc

-- 
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to