4 ms·
http://golang.org/pkg/sort/#example_Interface http://golang.org/pkg/sort/#example_Interface
by nickpresta 13y ago
http://golang.org/pkg/sort/#example_Interface http://golang.org/pkg/sort/#example_Interface
- herge 13y agoSo the answer is yes, I have to implement the whole interface?
- stonemetal 13y agoYes, to use code that relies on an interface you must implement the interface for your types. That is one of the reasons go has a guiding design principle that interfaces should be as small as possible.
- bouk 13y agoYes, generics are not (yet??) possible in go