]> Cypherpunks.ru repositories - goredo.git/blobdiff - log.go
Redundant @documentencoding
[goredo.git] / log.go
diff --git a/log.go b/log.go
index 3064a7ad4b1d5dbf1a690c6a585e80d78502ec41..f4abdd078f41fc9b5e5aae1ee2dc2bd66633ba7a 100644 (file)
--- a/log.go
+++ b/log.go
@@ -1,6 +1,6 @@
 /*
 goredo -- djb's redo implementation on pure Go
-Copyright (C) 2020-2021 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2020-2023 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -59,7 +59,7 @@ var (
        CWarn  string
        CJS    string
        CReset string
-       CNone  string = "NONE"
+       CNone  = "NONE"
 
        flagDebug      = flag.Bool("d", false, fmt.Sprintf("enable debug logging (%s=1)", EnvDebug))
        flagNoProgress *bool
@@ -102,13 +102,13 @@ func init() {
 }
 
 func erasedStatus(s, end string) string {
-       if NoProgress {
+       if NoProgress || NoColor {
                return s + end
        }
        return s + KeyEraseLine + end
 }
 
-func trace(level, format string, args ...interface{}) {
+func tracef(level, format string, args ...interface{}) {
        var p string
        if MyPid != 0 {
                p = fmt.Sprintf("[%d] ", MyPid)