summaryrefslogtreecommitdiff
path: root/reloadMtime.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-12 04:31:12 -0500
committerJeff Carr <[email protected]>2025-10-12 04:31:12 -0500
commit9a13caa69b827ff3218d8295fa8e3dd66c98d61a (patch)
treece57f5c7b173c837b09ee706c3a63e4601362865 /reloadMtime.go
parentaf65616d4113375a2e79d1b8981e54980373414a (diff)
mv formatting to /lib/cobolv0.0.161
Diffstat (limited to 'reloadMtime.go')
-rw-r--r--reloadMtime.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/reloadMtime.go b/reloadMtime.go
index fa4708f..bc754b3 100644
--- a/reloadMtime.go
+++ b/reloadMtime.go
@@ -9,7 +9,7 @@ import (
"path/filepath"
"time"
- "go.wit.com/lib/config"
+ "go.wit.com/lib/cobol"
"go.wit.com/log"
"google.golang.org/protobuf/types/known/timestamppb"
)
@@ -52,7 +52,7 @@ func (repo *Repo) changedDir() bool {
return false
}
dur := mtime.AsTime().Sub(pbtime.AsTime())
- repo.StateChange = fmt.Sprintf("%s changed %s", fname, config.FormatDuration(dur))
+ repo.StateChange = fmt.Sprintf("%s changed %s", fname, cobol.FormatDuration(dur))
repo.Times.MtimeDir = mtime
return true
}
@@ -73,7 +73,7 @@ func (repo *Repo) didFileChange(fname string, pbtime *timestamppb.Timestamp) boo
return false
}
dur := mtime.AsTime().Sub(pbtime.AsTime())
- repo.StateChange = fmt.Sprintf("%s mtime changed %s", fname, config.FormatDuration(dur))
+ repo.StateChange = fmt.Sprintf("%s mtime changed %s", fname, cobol.FormatDuration(dur))
// need to reload from the filesystem
return true
}
@@ -104,7 +104,7 @@ func (repo *Repo) updateMtime(fname string, pbname string) bool {
return false
}
dur := mtime.AsTime().Sub(pbtime.AsTime())
- repo.StateChange = fmt.Sprintf("%s changed %s", fname, config.FormatDuration(dur))
+ repo.StateChange = fmt.Sprintf("%s changed %s", fname, cobol.FormatDuration(dur))
repo.Times.MtimeHead = mtime
return true
}
@@ -127,7 +127,7 @@ func (repo *Repo) changedHead() bool {
return false
}
dur := mtime.AsTime().Sub(pbtime.AsTime())
- repo.StateChange = fmt.Sprintf("%s changed %s", fname, config.FormatDuration(dur))
+ repo.StateChange = fmt.Sprintf("%s changed %s", fname, cobol.FormatDuration(dur))
repo.Times.MtimeHead = mtime
return true
}
@@ -152,7 +152,7 @@ func (repo *Repo) changedConfig() bool {
return false
}
dur := mtime.AsTime().Sub(pbtime.AsTime())
- repo.StateChange = fmt.Sprintf("%s changed %s", fname, config.FormatDuration(dur))
+ repo.StateChange = fmt.Sprintf("%s changed %s", fname, cobol.FormatDuration(dur))
repo.Times.MtimeConfig = mtime
return true
}
@@ -174,7 +174,7 @@ func (repo *Repo) changedIndex() bool {
return false
}
dur := mtime.AsTime().Sub(pbtime.AsTime())
- repo.StateChange = fmt.Sprintf("%s changed %s", fname, config.FormatDuration(dur))
+ repo.StateChange = fmt.Sprintf("%s changed %s", fname, cobol.FormatDuration(dur))
repo.Times.MtimeIndex = mtime
return true
}
@@ -306,7 +306,7 @@ func (r *Repo) didRepoChangeVerbose() (bool, error) {
lastupdate := r.Times.LastUpdate.AsTime()
dur := time.Since(lastupdate)
if dur < 5*time.Minute {
- log.Info("repo.ReloadMtime() was was last run", config.FormatDuration(dur), r.Namespace)
+ log.Info("repo.ReloadMtime() was was last run", cobol.FormatDuration(dur), r.Namespace)
output = true
}
} else {
@@ -335,7 +335,7 @@ func (r *Repo) didRepoChangeVerbose() (bool, error) {
lastupdate := r.Times.LastUpdate.AsTime()
dur := time.Since(lastupdate)
if dur < 5*time.Minute {
- log.Info("repo.ReloadMtime() MtimeDir last run", config.FormatDuration(dur), r.Namespace)
+ log.Info("repo.ReloadMtime() MtimeDir last run", cobol.FormatDuration(dur), r.Namespace)
r.RunVerbose([]string{"ls", "-l", ".git", "-d"})
output = true
}