tube/pkg/media/playlist.go
2019-06-26 14:02:31 -05:00

15 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
}