Add golangci (#6418)

This commit is contained in:
kolaente 2019-06-12 21:41:28 +02:00 committed by techknowlogick
parent 5832f8d90d
commit f9ec2f89f2
147 changed files with 1046 additions and 774 deletions

View file

@ -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