I recently found the package github.com/matryer/is <https://godoc.org/github.com/matryer/is>, and really liked its trick of loading the source code (found using runtime.Callers) so that the the messages for test failures could be created automatically. Enough that I experimented with my own package. However, this does mean that the messages can not be created if the test binary is run on a separate machine, or in a sandbox. I can't think of any cases where this would be an issue, but (as an example), it does break on the playground <https://play.golang.org/p/FNb9SuCXgaw>.
Does anyone have experience with this technique in production? -- 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/d7a801c1-17aa-4f4b-9e46-abcc36fd49ff%40googlegroups.com.