3 ms·
This is already a thing, no? https://blog.golang.org/generate https://blog.golang.org/generate
by amaranth 11y ago
This is already a thing, no? https://blog.golang.org/generate https://blog.golang.org/generate
- PopsiclePete 11y agoAlmost. So close. But no cigar. Go generate is for the package creator, not the package consumer. So you, as a package creator, may create a "generic" red-black tree, but unless you pre-generate all my use cases for all my data types, I can't pull your package and then use go generate to create Tree<int> and Tree<string> if that makes sense.