*: raft related int64 -> uint64

This commit is contained in:
Xiang Li
2014-10-08 19:58:53 +08:00
parent af5b8c6c44
commit 8bbbaa88b2
18 changed files with 88 additions and 98 deletions

View File

@@ -1,8 +1,8 @@
package types
// Int64Slice implements sort interface
type Int64Slice []int64
// Uint64Slice implements sort interface
type Uint64Slice []uint64
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] }
func (p Uint64Slice) Len() int { return len(p) }
func (p Uint64Slice) Less(i, j int) bool { return p[i] < p[j] }
func (p Uint64Slice) Swap(i, j int) { p[i], p[j] = p[j], p[i] }