From aec1833fe69af27dc5a77f652b1a02af3097d9e9 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 3 Dec 2024 03:19:22 -0600 Subject: [PATCH] might be right? --- gitTag.update.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/gitTag.update.go b/gitTag.update.go index 47afb38..8a7cea0 100644 --- a/gitTag.update.go +++ b/gitTag.update.go @@ -80,3 +80,16 @@ func getGitDateStamp(gitdefault string) time.Time { } return tagTime } + +func (tag *GitTag) GetAge() time.Duration { + return time.Since(tag.GetAuthordate().AsTime()) +} + +func (repo *Repo) NewestTag() *GitTag { + loop := repo.Tags.SortByAge() + for loop.Scan() { + r := loop.Next() + return r + } + return nil +}