logger: do not interpret encoded url as format string (#7110)

Error logger currently interprets encoded url in the error as a format string.
This commit is contained in:
kannappanr 2019-01-24 00:30:00 -08:00 committed by GitHub
parent 82af0be1aa
commit 8ee8ad777c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -39,11 +39,11 @@ var (
}
return fmt.Sprint
}()
ColorFgRed = func() func(format string, a ...interface{}) string {
ColorFgRed = func() func(a ...interface{}) string {
if isTerminal() {
return color.New(color.FgRed).SprintfFunc()
return color.New(color.FgRed).SprintFunc()
}
return fmt.Sprintf
return fmt.Sprint
}()
ColorBgRed = func() func(format string, a ...interface{}) string {
if isTerminal() {