mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdserver: move int64Slice into pkg/types/
This commit is contained in:
8
pkg/types/slice.go
Normal file
8
pkg/types/slice.go
Normal 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] }
|
||||
Reference in New Issue
Block a user