summaryrefslogtreecommitdiff
path: root/common.go
diff options
context:
space:
mode:
Diffstat (limited to 'common.go')
-rw-r--r--common.go42
1 files changed, 21 insertions, 21 deletions
diff --git a/common.go b/common.go
index 717cc89..b0f6c17 100644
--- a/common.go
+++ b/common.go
@@ -18,13 +18,13 @@ func (r *RepoList) Hide() {
r.reposbox.Hide()
}
-func (r *RepoList) FindRepo(path string) *Repo {
+func (r *RepoList) FindRepo(path string) *RepoRow {
repo, _ := me.allrepos[path]
return repo
}
-func (r *RepoList) AllRepos() []*Repo {
- var all []*Repo
+func (r *RepoList) AllRepos() []*RepoRow {
+ var all []*RepoRow
for _, repo := range me.allrepos {
all = append(all, repo)
}
@@ -32,8 +32,8 @@ func (r *RepoList) AllRepos() []*Repo {
}
// deprecate this
-func AllRepos() []*Repo {
- var all []*Repo
+func AllRepos() []*RepoRow {
+ var all []*RepoRow
for _, repo := range me.allrepos {
all = append(all, repo)
}
@@ -41,40 +41,40 @@ func AllRepos() []*Repo {
}
// a human readable state of the current repo
-func (r *Repo) State() string {
+func (r *RepoRow) State() string {
return r.gitState.String()
}
-func (r *Repo) Scan() bool {
+func (r *RepoRow) Scan() bool {
return r.NewScan()
}
// returns a name for human consuption only
// todo: implement nicknames
-func (rs *Repo) Name() string {
+func (rs *RepoRow) Name() string {
if rs.Status.IsGoLang() {
return rs.Status.GoPath()
}
return rs.Status.Path()
}
-func (r *Repo) Exists(s string) bool {
+func (r *RepoRow) Exists(s string) bool {
return false
}
-func (r *Repo) GoPath() string {
+func (r *RepoRow) GoPath() string {
return r.Status.GoPath()
}
-func (r *Repo) CheckDirty() bool {
+func (r *RepoRow) CheckDirty() bool {
return r.Status.CheckDirty()
}
-func (r *Repo) IsDirty() bool {
+func (r *RepoRow) IsDirty() bool {
return r.Status.IsDirty()
}
-func (r *Repo) ReadOnly() bool {
+func (r *RepoRow) ReadOnly() bool {
if r == nil {
log.Warn("ReadOnly() repo == nil")
return false
@@ -86,7 +86,7 @@ func (r *Repo) ReadOnly() bool {
return r.Status.ReadOnly()
}
-func (r *Repo) LastTag() string {
+func (r *RepoRow) LastTag() string {
if r == nil {
log.Warn("LastTag() repo == nil")
return ""
@@ -101,7 +101,7 @@ func (r *Repo) LastTag() string {
// be sure that anything will run with older versions
// because this are changing too often at this point
// TODO: revisit this in 2025 or 2026
-func (r *Repo) GoState() string {
+func (r *RepoRow) GoState() string {
if r == nil {
log.Info("GoState() r == nil")
return "goState == nil"
@@ -113,7 +113,7 @@ func (r *Repo) GoState() string {
return r.goState.String()
}
-func (r *Repo) SetGoState(s string) {
+func (r *RepoRow) SetGoState(s string) {
if r == nil {
log.Info("SetGoState() r == nil")
return
@@ -125,7 +125,7 @@ func (r *Repo) SetGoState(s string) {
r.goState.SetText(s)
}
-func (r *Repo) IsPerfect() bool {
+func (r *RepoRow) IsPerfect() bool {
if r.gitState.String() == "PERFECT" {
return true
}
@@ -135,20 +135,20 @@ func (r *Repo) IsPerfect() bool {
return false
}
-func (r *Repo) RunCmd(cmd []string) (error, string) {
+func (r *RepoRow) RunCmd(cmd []string) (error, string) {
return r.Status.RunCmd(cmd)
}
-func (r *Repo) AllTags() []*repostatus.Tag {
+func (r *RepoRow) AllTags() []*repostatus.Tag {
return r.Status.Tags.ListAll()
}
-func (r *Repo) TagsBox() *repostatus.GitTagBox {
+func (r *RepoRow) TagsBox() *repostatus.GitTagBox {
return r.Status.Tags
}
// todo, fix bool return for deletetag()
-func (r *Repo) DeleteTag(t *repostatus.Tag) bool {
+func (r *RepoRow) DeleteTag(t *repostatus.Tag) bool {
r.Status.DeleteTag(t)
return true
}