From: Sergey Matveev Date: Mon, 16 Oct 2023 10:42:45 +0000 (+0300) Subject: Proper case of variable name X-Git-Tag: v2.2.0~1 X-Git-Url: http://www.git.cypherpunks.ru/?p=goredo.git;a=commitdiff_plain;h=734d81bb07d88fb293fefe6f9a0e75eb151dd555 Proper case of variable name --- 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)