summaryrefslogtreecommitdiff
path: root/git.go
diff options
context:
space:
mode:
Diffstat (limited to 'git.go')
-rw-r--r--git.go15
1 files changed, 5 insertions, 10 deletions
diff --git a/git.go b/git.go
index 3c8efae..4875812 100644
--- a/git.go
+++ b/git.go
@@ -2,6 +2,7 @@ package repostatus
import (
"strings"
+ "time"
"unicode/utf8"
"io/ioutil"
@@ -9,16 +10,6 @@ import (
"go.wit.com/log"
)
-func (rs *RepoStatus) String() string {
- return rs.path.String()
-}
-
-/*
-func (rs *RepoStatus) GetPath() string {
- return rs.path.String()
-}
-*/
-
func (rs *RepoStatus) GetCurrentBranchName() string {
return rs.currentBranch.String()
}
@@ -27,6 +18,10 @@ func (rs *RepoStatus) GetCurrentBranchVersion() string {
return rs.currentVersion.String()
}
+func (rs *RepoStatus) LastTagAge() (time.Time, string) {
+ return time.Now(), rs.lasttag.String()
+}
+
func (rs *RepoStatus) GetLastTagVersion() string {
return rs.lasttag.String()
}