From 7b73f1d91d88bb8974435ab9b16f5a4c8f5d7307 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 8 Oct 2025 06:34:24 -0500 Subject: minor --- generate.go | 17 ----------------- generate.off | 17 +++++++++++++++++ tablePull.go | 14 ++++++++------ 3 files changed, 25 insertions(+), 23 deletions(-) delete mode 100644 generate.go create mode 100644 generate.off diff --git a/generate.go b/generate.go deleted file mode 100644 index 6158d14..0000000 --- a/generate.go +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright 2025 WIT.COM Inc Licensed GPL 3.0 - -package forgepb - -// NOTE: it would be helpful if go.mod doesn't exist, that go generate -// would automatically run go mod init and go mod tidy -// and allow directives to 'go get go.wit.com/apps/autogenpb' -// then this process could be fully automated -// -//go:generate make go-generate -//go:generate go install -v go.wit.com/apps/autogenpb -//go:generate autogenpb --proto forgeConfig.proto -//go:generate autogenpb --proto patch.proto -//go:generate autogenpb --proto set.proto -// # go:generate go get golang.org/x/tools # repo seems broken at this time (?) -// # go:generate go install -v golang.org/x/tools/cmd/goimports -//go:generate bash -c "goimports -w *.go" diff --git a/generate.off b/generate.off new file mode 100644 index 0000000..6158d14 --- /dev/null +++ b/generate.off @@ -0,0 +1,17 @@ +// Copyright 2025 WIT.COM Inc Licensed GPL 3.0 + +package forgepb + +// NOTE: it would be helpful if go.mod doesn't exist, that go generate +// would automatically run go mod init and go mod tidy +// and allow directives to 'go get go.wit.com/apps/autogenpb' +// then this process could be fully automated +// +//go:generate make go-generate +//go:generate go install -v go.wit.com/apps/autogenpb +//go:generate autogenpb --proto forgeConfig.proto +//go:generate autogenpb --proto patch.proto +//go:generate autogenpb --proto set.proto +// # go:generate go get golang.org/x/tools # repo seems broken at this time (?) +// # go:generate go install -v golang.org/x/tools/cmd/goimports +//go:generate bash -c "goimports -w *.go" diff --git a/tablePull.go b/tablePull.go index ebe062f..62b69c3 100644 --- a/tablePull.go +++ b/tablePull.go @@ -3,8 +3,7 @@ package forgepb import ( - "path/filepath" - + "go.wit.com/lib/config" "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" ) @@ -30,11 +29,14 @@ func (f *Forge) makePullTable(pb *gitpb.Repos) *gitpb.ReposTable { // col.SetTitle("mver") col.Width = 15 - col = t.AddStringFunc("blah", func(r *gitpb.Repo) string { - _, base := filepath.Split(r.Namespace) - return base + col = t.AddStringFunc("age", func(r *gitpb.Repo) string { + if r.IsDirty() { + return "*" + } + dur := r.NewestAge() + return config.FormatDuration(dur) }) - col.Width = 9 + col.Width = 3 col = t.AddDevelVersion() col.Width = 15 -- cgit v1.2.3