Created
August 31, 2011 16:47
-
-
Save skelterjohn/1184026 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type SorterDefault []MyType | |
func (s SorterDefault) Len() int { return len(s)} | |
func (s SorterDefault) Swap(i, j int) { s[i], s[j] = s[j], s[i]} | |
type Sorter1 struct { SorterDefault } | |
func (s Sorter1) Less(i, j int) bool { ... } | |
type Sorter2 struct { SorterDefault } | |
func (s Sorter2) Less(i, j int) bool { ... } | |
type Sorter3 struct { SorterDefault } | |
func (s Sorter3) Less(i, j int) bool { ... } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment