I prefer the testify package. It has a mocking suite. I dont have first hand experience with gomock though.
--
You received this message because you are subscribed to the Google Groups "pki.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pki_io+un...@googlegroups.com.
To post to this group, send email to pki...@googlegroups.com.
Visit this group at https://groups.google.com/group/pki_io.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pki_io/16c13f7a-2607-4bb7-aca8-ae17775527cf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I prefer the testify package. It has a mocking suite. I dont have first hand experience with gomock though.
Ideally, the code would be laid out in a way that promotes easy mocking of input (from file for example) using interfaces (for instance, pass around io.Reader interfaces instead of file paths), but for times when this just isn't practical, creating dummy files in the TMPDIR before a test is common.
This looks promising: https://github.com/blang/vfs
--
You received this message because you are subscribed to the Google Groups "pki.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pki_io+un...@googlegroups.com.
To post to this group, send email to pki...@googlegroups.com.
Visit this group at https://groups.google.com/group/pki_io.
To view this discussion on the web, visit https://groups.google.com/d/msgid/pki_io/551020fa-dac4-4807-a6c0-b2cd4b1d52f4%40googlegroups.com.