mirror of
https://github.com/signaller-matrix/signaller.git
synced 2024-11-09 20:21:03 +00:00
12 lines
301 B
Go
12 lines
301 B
Go
|
package memory
|
||
|
|
||
|
import (
|
||
|
"github.com/nxshock/signaller/internal"
|
||
|
)
|
||
|
|
||
|
type BySize []internal.Room
|
||
|
|
||
|
func (a BySize) Len() int { return len(a) }
|
||
|
func (a BySize) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
|
||
|
func (a BySize) Less(i, j int) bool { return len(a[i].Users()) > len(a[j].Users()) }
|