|
|
|
|
|
by krakensden
4594 days ago
|
|
The usual pattern is to use a type that requires the thing you pass in to have methods that you use for the data structure, like sort.Interface[1]. It's faster, safer, and better than using interface{}. As for shorthand, behold! type any interface{}
[1]: http://golang.org/pkg/sort/#Interface |
|
(Unless I'm mistaken here, which might very well be the case.)