summaryrefslogtreecommitdiff
path: root/argv.Print.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-28 23:41:21 -0500
committerJeff Carr <[email protected]>2025-10-28 23:41:21 -0500
commit6b78f1857fe35d39bfef3e5e8a03cbd0e71fa169 (patch)
treebfd7ae418aa5968583d0b3c1072a230e2e8e1f0d /argv.Print.go
parentd1c6c000ccedf21e356ee30411b861b544313e18 (diff)
never shoulda been caps
Diffstat (limited to 'argv.Print.go')
-rw-r--r--argv.Print.go28
1 files changed, 14 insertions, 14 deletions
diff --git a/argv.Print.go b/argv.Print.go
index a35d380..49b1089 100644
--- a/argv.Print.go
+++ b/argv.Print.go
@@ -12,12 +12,12 @@ import (
"go.wit.com/lib/config"
)
-func (pb *Argv) Debugf(fmts string, parts ...any) {
- Debugf(fmts, parts...)
+func (pb *Argv) debugf(fmts string, parts ...any) {
+ debugf(fmts, parts...)
}
// decides here to print to STDERR or not
-func Debugf(fmts string, parts ...any) {
+func debugf(fmts string, parts ...any) {
fmts = strings.TrimSpace(fmts)
fmts += "\n"
// me.pb.Stderr += fmt.Sprintf(fmts, parts...)
@@ -25,11 +25,11 @@ func Debugf(fmts string, parts ...any) {
}
// print out auto complete debugging info
-func (pb *Argv) PrintDebug(last string) {
- pb.PrintDebugNew("ARGV", me.last)
+func (pb *Argv) printDebug(last string) {
+ pb.printDebugNew("ARGV", me.last)
}
-func (pb *Argv) PrintDebugNew(msg string, last *Argv) {
+func (pb *Argv) printDebugNew(msg string, last *Argv) {
// var arglast string
// arglast = fmt.Sprintf("last='%s'", last.GetCmd())
partial := fmt.Sprintf("p='%s'", pb.Partial)
@@ -46,16 +46,16 @@ func (pb *Argv) PrintDebugNew(msg string, last *Argv) {
lens := fmt.Sprintf("len=%-2d,%-2d,%-2d", me.all.Len(), len(strings.Fields(pb.Stdout)), len(strings.Split(pb.Stderr, "\n")))
fast := fmt.Sprintf("F%-2dout%-2derr%-2d %s", pb.Fast, pb.OutCounter, pb.ErrCounter, lens)
top := fmt.Sprintf("%-4.4s age=(%s)(%s)dur(%s) %s %s cmd=%-12.12s", pb.Uuid, age, pdur, argvdur, dbg, fast, pb.GetCmd())
- Debugf("%s: %s %-12.12s real='%v'", msg, top, partial, pb.Real)
+ debugf("%s: %s %-12.12s real='%v'", msg, top, partial, pb.Real)
}
-func (all *Argvs) PrintHistory(msg string) {
+func (all *Argvs) printHistory(msg string) {
counter := 0
var last *Argv
// for pb := range all.Argv[0:10] {
for pb := range all.IterAll() {
counter += 1
- pb.PrintDebugNew(msg, last)
+ pb.printDebugNew(msg, last)
last = pb
if counter > 30 {
// sometimes I'm dumb
@@ -64,12 +64,12 @@ func (all *Argvs) PrintHistory(msg string) {
}
}
-func PrintStddbg() {
+func printStddbg() {
if !me.debug {
return
}
if config.Exists("/tmp/argv.debug") {
- PrintStddbgFile()
+ printStddbgFile()
return
}
lines := strings.Split(strings.TrimSpace(PB.Stddbg), "\n")
@@ -83,7 +83,7 @@ func PrintStddbg() {
fmt.Fprintf(os.Stderr, "\n")
}
-func PrintStddbgFile() {
+func printStddbgFile() {
if !me.debug {
return
}
@@ -103,7 +103,7 @@ func PrintStddbgFile() {
fmt.Fprintf(f, "\n")
}
-func PrintStderr() {
+func printStderr() {
var lines []string
for _, line := range strings.Split(strings.TrimSpace(PB.Stderr), "\n") {
if strings.TrimSpace(line) == "" {
@@ -125,7 +125,7 @@ func PrintStderr() {
fmt.Fprintf(os.Stderr, "\n")
}
-func PrintStdout() {
+func printStdout() {
line := strings.TrimSpace(PB.Stdout)
if line == "" {
return