3 ms·
Cool, I didn't know that. will change my Set implementation :) BTW You should remember that if you really want a python-like set, map[interface{}]struct{} is n
by dvirsky 13y ago
Cool, I didn't know that. will change my Set implementation :)
BTW You should remember that if you really want a python-like set, map[interface{}]struct{} is not enough - you still have to implement intersection, union, diff yourself. Not that it's rocket science, but I do think this warrants at least a package in the std library, if not a first class type.
- nickpresta 13y agoAgreed. There is an awesome project that provides this: https://github.com/deckarep/golang-set https://github.com/deckarep/golang-set