diff options
| author | Jeff Carr <[email protected]> | 2025-01-08 00:51:53 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-01-08 00:51:53 -0600 |
| commit | bcabf1b3b75f86f09114116afb2636b507ededcc (patch) | |
| tree | ab3d79102bba613ddc43bc3a2a1daee9003b0fdb /human.go | |
| parent | d5143b94b8527eb94e09f9c46443a2e359e1219b (diff) | |
move COBOL like print table into forgepb
Diffstat (limited to 'human.go')
| -rw-r--r-- | human.go | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/human.go b/human.go deleted file mode 100644 index 68d2bfc..0000000 --- a/human.go +++ /dev/null @@ -1,91 +0,0 @@ -package main - -import ( - "os" - "path/filepath" - "time" - - "go.wit.com/lib/gui/shell" - "go.wit.com/lib/protobuf/gitpb" - "go.wit.com/log" -) - -func HumanPrintRepo(check *gitpb.Repo) { - if check == nil { - log.Info("forge: you sent me nil") - return - } - - if check.GetTargetVersion() == "" { - log.Info("TargetVersion == blank") - } - if check.GetTargetVersion() == check.GetCurrentVersion() { - log.Info("IsReleased() == true. do not release this a second time") - } else { - log.Info("IsReleased() == false") - } - if check.CheckDirty() { - log.Info("CheckDirty() == true. do not release dirty repos") - } else { - log.Info("CheckDirty() == false") - } - if check.GetGoPrimitive() { - log.Info("IsPrimitive() == true") - } else { - log.Info("IsPrimitive() == false") - } - if me.forge.Config.IsPrivate(check.GetGoPath()) { - log.Info("IsPrivate() == true") - } else { - log.Info("IsPrivate() == false") - } - if ok, compiled, err := check.IsProtobuf(); ok { - log.Info(log.Sprint("IsProtobuf() == true compiled protobuf files = ", compiled)) - if err != nil { - log.Info("IsProtobuf() ERROR = ", err) - } - for _, s := range compiled { - log.Info("\tcompiled file found:", s) - } - } else { - log.Info("IsProtobuf() == false") - if err != nil { - log.Info("IsProtobuf() ERROR = ", err) - } - } - - // testNext(check) - - me.found.AppendUniqueGoPath(check) - doHumanTable() - - printTime("LastPull", check.Times.LastPull.AsTime()) - printTime("LastUpdate", check.Times.LastUpdate.AsTime()) - printTime("LastDirty", check.Times.LastDirty.AsTime()) - printTime("dir mtime", check.Times.MtimeDir.AsTime()) - printTime("HEAD mtime", check.Times.MtimeHead.AsTime()) - printTime("Index mtime", check.Times.MtimeIndex.AsTime()) - printTime("fetch", check.Times.MtimeFetch.AsTime()) - printTime("last go.sum", check.Times.LastGoDep.AsTime()) - printTime("last commit", check.Times.NewestCommit.AsTime()) -} - -func testGoRepo(check *gitpb.Repo) { - data, _ := os.ReadFile(filepath.Join(check.FullPath, "go.mod")) - log.Info(string(data)) - - if me.forge.FinalGoDepsCheckOk(check) { - log.Info("forge.FinalGoDepsCheck(check) worked!") - } else { - log.Info("forge.FinalGoDepsCheck(check) failed. boo.") - } - -} - -func printTime(s string, t time.Time) { - now := time.Now() - dur := now.Sub(t) - if dur < (time.Hour * 24) { - log.Printf("%s mtime last changed %s\n", s, shell.FormatDuration(dur)) - } -} |
