fixed name as a 'scanner'
This commit is contained in:
parent
acc18b186f
commit
7297b63339
|
@ -12,7 +12,7 @@ import (
|
||||||
// todo: probably switch to using slices. new things added in 1.23
|
// todo: probably switch to using slices. new things added in 1.23
|
||||||
// https://pkg.go.dev/slices
|
// https://pkg.go.dev/slices
|
||||||
|
|
||||||
func (all *GitTags) newSort() *GitTagIterator {
|
func (all *GitTags) newSort() *GitTagScanner {
|
||||||
slices.SortFunc(all.GitTags, func(a, b *GitTag) int {
|
slices.SortFunc(all.GitTags, func(a, b *GitTag) int {
|
||||||
if n := strings.Compare(a.Name, b.Name); n != 0 {
|
if n := strings.Compare(a.Name, b.Name); n != 0 {
|
||||||
return n
|
return n
|
||||||
|
@ -44,12 +44,12 @@ func (all *GitTags) GetAge(name string) time.Time {
|
||||||
return newest
|
return newest
|
||||||
}
|
}
|
||||||
|
|
||||||
func (all *GitTags) SortByAge() *GitTagIterator {
|
func (all *GitTags) SortByAge() *GitTagScanner {
|
||||||
packs := all.selectAllGitTags()
|
packs := all.selectAllGitTags()
|
||||||
|
|
||||||
sort.Sort(GitTagAge(packs))
|
sort.Sort(GitTagAge(packs))
|
||||||
|
|
||||||
iterator := newGitTagIterator(packs)
|
iterator := newGitTagScanner(packs)
|
||||||
return iterator
|
return iterator
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue