diff options
Diffstat (limited to 'common.go')
| -rw-r--r-- | common.go | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -2,6 +2,7 @@ package repolist import ( "go.wit.com/lib/gui/repostatus" + "go.wit.com/gui" "go.wit.com/log" ) @@ -74,11 +75,23 @@ func (r *Repo) IsDirty() bool { } func (r *Repo) ReadOnly() bool { + if r == nil { + log.Warn("ReadOnly() repo == nil") + return false + } + if r.Status == nil { + log.Warn("ReadOnly() repo.Status == nil") + return false + } return r.Status.ReadOnly() } func (r *Repo) LastTag() string { - return r.Status.GetLastTagVersion() + if r == nil { + log.Warn("LastTag() repo == nil") + return "" + } + return r.lastTag.String() } // returns the state of the GO go.mod and go.sum files @@ -139,3 +152,7 @@ func (r *Repo) DeleteTag(t *repostatus.Tag) bool { r.Status.DeleteTag(t) return true } + +func (rl *RepoList) MirrorShownCount() *gui.Node { + return gui.RawMirror(rl.shownCount) +} |
