move to protobuf

This commit is contained in:
Jeff Carr 2024-12-03 03:18:58 -06:00
parent 0bc9bed597
commit a6b9170ad0
2 changed files with 12 additions and 16 deletions

View File

@ -86,7 +86,6 @@ func isEmpty(a any) bool {
return false return false
} }
func (r *RepoList) MakePatchset(setdir string) bool { func (r *RepoList) MakePatchset(setdir string) bool {
for _, repo := range r.allrepos { for _, repo := range r.allrepos {
userv := repo.Status.GetUserVersion() userv := repo.Status.GetUserVersion()

View File

@ -4,7 +4,6 @@ package repolist
import ( import (
"fmt" "fmt"
"time"
"go.wit.com/lib/gui/shell" "go.wit.com/lib/gui/shell"
) )
@ -13,14 +12,13 @@ import (
// https://pkg.go.dev/fmt has good references for Sprintf // https://pkg.go.dev/fmt has good references for Sprintf
func (r *RepoRow) StandardHeader() string { func (r *RepoRow) StandardHeader() string {
lastTag := r.LastTag() lastTag := r.LastTag()
tag := r.Status.NewestTag() tag := r.pb.NewestTag()
gitAge, _ := tag.GetDate() dur := tag.GetAge()
dur := time.Since(gitAge)
target := r.Status.GetTargetVersion() target := r.pb.GetTargetVersion()
master := r.Status.GetMasterVersion() master := r.pb.GetMasterVersion()
devel := r.Status.GetDevelVersion() devel := r.pb.GetDevelVersion()
user := r.Status.GetUserVersion() user := r.pb.GetUserVersion()
header := fmt.Sprintf("%-35s %5s %-10s %-10s %-20s %-20s %-20s %-15s", header := fmt.Sprintf("%-35s %5s %-10s %-10s %-20s %-20s %-20s %-15s",
r.Name(), shell.FormatDuration(dur), 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. // makes a human readable thing for standard out.
func (r *RepoRow) StandardReleaseHeader() string { func (r *RepoRow) StandardReleaseHeader() string {
lastTag := r.LastTag() lastTag := r.LastTag()
tag := r.Status.NewestTag() tag := r.pb.NewestTag()
gitAge, _ := tag.GetDate() dur := tag.GetAge()
dur := time.Since(gitAge)
curname := r.Status.GetCurrentBranchName() curname := r.pb.GetCurrentBranchName()
master := r.Status.GetMasterVersion() master := r.pb.GetMasterVersion()
user := r.Status.GetUserVersion() user := r.pb.GetUserVersion()
target := r.Status.GetTargetVersion() target := r.pb.GetTargetVersion()
header := fmt.Sprintf("%-35s %5s %-10s %-10s %-10s %-20s %-20s %-15s", header := fmt.Sprintf("%-35s %5s %-10s %-10s %-10s %-20s %-20s %-15s",
r.Name(), shell.FormatDuration(dur), curname, r.Name(), shell.FormatDuration(dur), curname,