tube/pkg/media/playlist.go

16 lines
218 B
Go
Raw Normal View History

2019-06-26 22:02:31 +03:00
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
}