etcdserver: move int64Slice into pkg/types/

This commit is contained in:
Yicheng Qin
2014-10-06 15:12:02 -07:00
parent 314d425718
commit c15c3eab4c
3 changed files with 13 additions and 16 deletions

8
pkg/types/slice.go Normal file
View File

@@ -0,0 +1,8 @@
package types
// Int64Slice implements sort interface
type Int64Slice []int64
func (p Int64Slice) Len() int { return len(p) }
func (p Int64Slice) Less(i, j int) bool { return p[i] < p[j] }
func (p Int64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }