forked from kevadesu/forgejo
Add golangci (#6418)
This commit is contained in:
parent
5832f8d90d
commit
f9ec2f89f2
147 changed files with 1046 additions and 774 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue