logging: linter fixes
This commit is contained in:
@@ -32,31 +32,6 @@ const (
|
||||
// DefaultLevel is the default logging level when none is provided.
|
||||
const DefaultLevel = LevelInfo
|
||||
|
||||
// Cheap integer to fixed-width decimal ASCII. Give a negative width
|
||||
// to avoid zero-padding. (From log/log.go in the standard library).
|
||||
func itoa(i int, wid int) string {
|
||||
// Assemble decimal in reverse order.
|
||||
var b [20]byte
|
||||
bp := len(b) - 1
|
||||
for i >= 10 || wid > 1 {
|
||||
wid--
|
||||
q := i / 10
|
||||
b[bp] = byte('0' + i - q*10)
|
||||
bp--
|
||||
i = q
|
||||
}
|
||||
// i < 10
|
||||
b[bp] = byte('0' + i)
|
||||
return string(b[bp:])
|
||||
}
|
||||
|
||||
func writeToOut(level Level) bool {
|
||||
if level < LevelWarning {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var levelPrefix = [...]string{
|
||||
LevelDebug: "DEBUG",
|
||||
LevelInfo: "INFO",
|
||||
|
||||
Reference in New Issue
Block a user