diff options
| author | Jeff Carr <[email protected]> | 2024-02-19 19:43:21 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-02-19 19:43:21 -0600 |
| commit | 47d27e4166b960d7b84c9f6d974cc580843d59e9 (patch) | |
| tree | 226b0ba7da4d42bc3d4e96fe600e76761d221db9 /common.go | |
| parent | 240da220878c0e24fc40f40c7ea16fff66250d4e (diff) | |
used a blind widget
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) +} |
