You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's very common to use packages like testify or is as a set of helper methods that make testing code more readable. The reason behind using packages like that is to avoid writing repetitive code like the following.
Using generics has a big benefit over using any - we have a compile-time type check.
I know that saving those 2 lines of code doesn't seem to be a big win but please remember that the code may be repeated many times in a single test file.
Reacted by Cornel
Reacted by Eric Lagergren, Dominik Honnef and Dan Kortschak
Activity
seankhliao commentedon Apr 25, 2022
Note we recommend against assertion libraries in TestComments https://github.com/golang/go/wiki/TestComments#assert-libraries
ianlancetaylor commentedon Apr 25, 2022
See also https://go.dev/doc/faq#assertions. This is an intentional choice.
icholy commentedon Apr 26, 2022
rsc commentedon May 4, 2022
This proposal has been declined as retracted.
— rsc for the proposal review group