Update change detection
This commit is contained in:
parent
6cad5a8efb
commit
00a93e466d
8 changed files with 140 additions and 84 deletions
|
|
@ -48,16 +48,6 @@ type AppRelease struct {
|
|||
|
||||
type AppReleases []AppRelease
|
||||
|
||||
type ChangeWatch struct {
|
||||
Name string
|
||||
URL string
|
||||
LastChanged time.Time
|
||||
DiffURL string
|
||||
DiffDisplay string
|
||||
}
|
||||
|
||||
type ChangeWatches []ChangeWatch
|
||||
|
||||
type Video struct {
|
||||
ThumbnailUrl string
|
||||
Title string
|
||||
|
|
@ -212,14 +202,6 @@ func (r AppReleases) SortByNewest() AppReleases {
|
|||
return r
|
||||
}
|
||||
|
||||
func (r ChangeWatches) SortByNewest() ChangeWatches {
|
||||
sort.Slice(r, func(i, j int) bool {
|
||||
return r[i].LastChanged.After(r[j].LastChanged)
|
||||
})
|
||||
|
||||
return r
|
||||
}
|
||||
|
||||
func (v Videos) SortByNewest() Videos {
|
||||
sort.Slice(v, func(i, j int) bool {
|
||||
return v[i].TimePosted.After(v[j].TimePosted)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue