mirror of https://github.com/edouardparis/lntop
channels: sort
parent
8f86d64101
commit
26cf65d62c
@ -0,0 +1,15 @@
|
||||
package models
|
||||
|
||||
type Order int
|
||||
|
||||
const (
|
||||
Asc Order = iota
|
||||
Desc
|
||||
)
|
||||
|
||||
func Int64Sort(a, b int64, o Order) bool {
|
||||
if o == Asc {
|
||||
return a > b
|
||||
}
|
||||
return a < b
|
||||
}
|
Loading…
Reference in New Issue