Comment Comment by dilatedmind Not without either implementing it yourself or wrapping interface methods.Go generate is like a manual step for having generics, I imagine one day soon its functionality or something similar will be part of go build.In response to your particular example, a map plus a mutex seems sufficient.I dig that it's a few extra lines of code, but I guess I'm looking for a really mean example. parent dilatedmind 8 years ago
Go generate is like a manual step for having generics, I imagine one day soon its functionality or something similar will be part of go build.
In response to your particular example, a map plus a mutex seems sufficient.
I dig that it's a few extra lines of code, but I guess I'm looking for a really mean example.