16 lines
218 B
Go
16 lines
218 B
Go
|
package media
|
||
|
|
||
|
type Playlist []*Video
|
||
|
|
||
|
func (p Playlist) Len() int {
|
||
|
return len(p)
|
||
|
}
|
||
|
|
||
|
func (p Playlist) Swap(i, j int) {
|
||
|
p[i], p[j] = p[j], p[i]
|
||
|
}
|
||
|
|
||
|
func (p Playlist) Less(i, j int) bool {
|
||
|
return p[i].ID < p[j].ID
|
||
|
}
|