From 734d81bb07d88fb293fefe6f9a0e75eb151dd555 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Mon, 16 Oct 2023 13:42:45 +0300 Subject: [PATCH] Proper case of variable name --- log.go | 6 +++--- main.go | 2 +- run.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/log.go b/log.go index f4abdd0..6b91c2d 100644 --- a/log.go +++ b/log.go @@ -49,7 +49,7 @@ var ( LogWait bool LogLock bool LogJS bool - MyPid int + MyPID int CDebug string CRedo string @@ -110,8 +110,8 @@ func erasedStatus(s, end string) string { func tracef(level, format string, args ...interface{}) { var p string - if MyPid != 0 { - p = fmt.Sprintf("[%d] ", MyPid) + if MyPID != 0 { + p = fmt.Sprintf("[%d] ", MyPID) } switch level { case CNone: diff --git a/main.go b/main.go index 4439bca..03a73d4 100644 --- a/main.go +++ b/main.go @@ -198,7 +198,7 @@ func main() { LogLock = os.Getenv(EnvLogLock) == "1" LogJS = os.Getenv(EnvLogJS) == "1" if Debug || os.Getenv(EnvLogPid) == "1" { - MyPid = os.Getpid() + MyPID = os.Getpid() } var traced bool if flagTraceAll != nil && *flagTraceAll { diff --git a/run.go b/run.go index 7a4c1e4..816f962 100644 --- a/run.go +++ b/run.go @@ -640,7 +640,7 @@ func runScript(tgt *Tgt, errs chan error, forced, traced bool) error { if StderrSilent { continue } - if MyPid == 0 { + if MyPID == 0 { tracef(CNone, "%s", line) } else { tracef(CNone, "%s %s", pid, line) -- 2.44.0