github.com/kilpkonn/gtm-enhanced@v1.3.5/util/sort.go (about) 1 // Copyright 2016 Michael Schenk. All rights reserved. 2 // Use of this source code is governed by a MIT-style 3 // license that can be found in the LICENSE file. 4 5 package util 6 7 // ByInt64 list of type int64 8 type ByInt64 []int64 9 10 func (e ByInt64) Len() int { return len(e) } 11 func (e ByInt64) Swap(i, j int) { e[i], e[j] = e[j], e[i] } 12 func (e ByInt64) Less(i, j int) bool { return e[i] < e[j] }