Re: [go-nuts] Utility functions for package testing that read the source code

2019-09-25 Thread Robert Johnstone
Thank-you for the feedback. I will also checkout the packages that you mentioned. No need to reinvent the wheel. Robert On Wednesday, 25 September 2019 08:15:19 UTC-4, rog wrote: > > I've been using packages that use this technique for a long time now > (first gopkg.in/check.v1

Re: [go-nuts] Utility functions for package testing that read the source code

2019-09-25 Thread roger peppe
I've been using packages that use this technique for a long time now (first gopkg.in/check.v1 , and latterly github.com/frankban/quicktest ), and I can confirm that it works great. In general, tests can assume

[go-nuts] Utility functions for package testing that read the source code

2019-09-24 Thread Robert Johnstone
I recently found the package 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