summaryrefslogtreecommitdiffstats
path: root/modules/log/colors.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/log/colors.go')
-rw-r--r--modules/log/colors.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/log/colors.go b/modules/log/colors.go
index 0ec8ce4ba8..c29741634f 100644
--- a/modules/log/colors.go
+++ b/modules/log/colors.go
@@ -208,7 +208,7 @@ normalLoop:
if i > lasti {
written, err := c.w.Write(bytes[lasti:i])
- totalWritten = totalWritten + written
+ totalWritten += written
if err != nil {
return totalWritten, err
}
@@ -243,7 +243,7 @@ normalLoop:
if bytes[j] == 'm' {
if c.mode == allowColor {
written, err := c.w.Write(bytes[i : j+1])
- totalWritten = totalWritten + written
+ totalWritten += written
if err != nil {
return totalWritten, err
}
@@ -278,7 +278,7 @@ func ColorSprintf(format string, args ...interface{}) string {
}
return fmt.Sprintf(format, v...)
}
- return fmt.Sprintf(format)
+ return format
}
// ColorFprintf will write to the provided writer similar to ColorSprintf
@@ -290,7 +290,7 @@ func ColorFprintf(w io.Writer, format string, args ...interface{}) (int, error)
}
return fmt.Fprintf(w, format, v...)
}
- return fmt.Fprintf(w, format)
+ return fmt.Fprint(w, format)
}
// ColorFormatted structs provide their own colored string when formatted with ColorSprintf