2 ms·
Though that is true, remember that Go doesn’t support co/contravariance on interface types. Defining interfaces around existing types works, but quickly falls
by EdSchouten 6y ago
Though that is true, remember that Go doesn’t support co/contravariance on interface types.
Defining interfaces around existing types works, but quickly falls apart as soon as methods return concrete types. In those cases you need to write more complex wrappers, which is often not worth the hassle.