diff options
| author | Jeff Carr <[email protected]> | 2024-12-03 00:35:50 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-03 00:35:50 -0600 |
| commit | 1d1d8e7eea642cd3fc546101b4899ec1db81e3b7 (patch) | |
| tree | 0a313aa1a49b1aeaacfc3df802171193ed76a324 /currentVersions.go | |
| parent | 7a90613c91fa5c06b6fbe5a7a6e48fbba722877d (diff) | |
lots of code hopefully better than before
Diffstat (limited to 'currentVersions.go')
| -rw-r--r-- | currentVersions.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/currentVersions.go b/currentVersions.go index d0a9c3f..4e9d843 100644 --- a/currentVersions.go +++ b/currentVersions.go @@ -6,9 +6,7 @@ package gitpb import ( "errors" "path/filepath" - "sort" "strings" - "time" "unicode" "go.wit.com/log" @@ -215,29 +213,3 @@ func trimNonNumericFromStart(s string) string { } return "" } - -func (all *GitTags) SortByAge() *GitTagIterator { - packs := all.selectAllGitTag() - - sort.Sort(GitTagAge(packs)) - - iterator := NewGitTagIterator(packs) - return iterator -} - -type GitTagAge []*GitTag - -func (a GitTagAge) Len() int { return len(a) } - -// sorts in ? order -func (a GitTagAge) Less(i, j int) bool { - if time.Since(a[i].Authordate.AsTime()) < time.Since(a[j].Authordate.AsTime()) { - return true - } - return false -} -func (a GitTagAge) Swap(i, j int) { a[i], a[j] = a[j], a[i] } - -func (repo *Repo) SetTargetVersion(target string) { - repo.TargetVersion = target -} |
