diff options
Diffstat (limited to 'human.go')
| -rw-r--r-- | human.go | 27 |
1 files changed, 12 insertions, 15 deletions
@@ -4,7 +4,6 @@ package repolist import ( "fmt" - "time" "go.wit.com/lib/gui/shell" ) @@ -13,14 +12,13 @@ import ( // https://pkg.go.dev/fmt has good references for Sprintf func (r *RepoRow) StandardHeader() string { lastTag := r.LastTag() - tag := r.Status.NewestTag() - gitAge, _ := tag.GetDate() - dur := time.Since(gitAge) + tag := r.pb.NewestTag() + dur := tag.GetAge() - target := r.Status.GetTargetVersion() - master := r.Status.GetMasterVersion() - devel := r.Status.GetDevelVersion() - user := r.Status.GetUserVersion() + target := r.pb.GetTargetVersion() + master := r.pb.GetMasterVersion() + devel := r.pb.GetDevelVersion() + user := r.pb.GetUserVersion() header := fmt.Sprintf("%-35s %5s %-10s %-10s %-20s %-20s %-20s %-15s", r.Name(), shell.FormatDuration(dur), @@ -85,14 +83,13 @@ func (v *RepoList) PrintReport(readonly string, onlydirty string, perfect string // makes a human readable thing for standard out. func (r *RepoRow) StandardReleaseHeader() string { lastTag := r.LastTag() - tag := r.Status.NewestTag() - gitAge, _ := tag.GetDate() - dur := time.Since(gitAge) + tag := r.pb.NewestTag() + dur := tag.GetAge() - curname := r.Status.GetCurrentBranchName() - master := r.Status.GetMasterVersion() - user := r.Status.GetUserVersion() - target := r.Status.GetTargetVersion() + curname := r.pb.GetCurrentBranchName() + master := r.pb.GetMasterVersion() + user := r.pb.GetUserVersion() + target := r.pb.GetTargetVersion() header := fmt.Sprintf("%-35s %5s %-10s %-10s %-10s %-20s %-20s %-15s", r.Name(), shell.FormatDuration(dur), curname, |
