Преглед изворни кода

Fix double-indirection bug in logging IDs (#12294) (#12308)

This PR fixes a bug in log.NewColoredIDValue() which led to a double
indirection and incorrect IDs being printed out.

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: zeripath <art27@cantab.net>
tags/v1.12.3
techknowlogick пре 3 година
родитељ
комит
8d1cd4d252
No account linked to committer's email address
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1
    1
      modules/log/colors.go

+ 1
- 1
modules/log/colors.go Прегледај датотеку

@@ -355,7 +355,7 @@ func NewColoredValueBytes(value interface{}, colorBytes *[]byte) *ColoredValue {
// The Value will be colored with FgCyan
// If a ColoredValue is provided it is not changed
func NewColoredIDValue(value interface{}) *ColoredValue {
return NewColoredValueBytes(&value, &fgCyanBytes)
return NewColoredValueBytes(value, &fgCyanBytes)
}

// Format will format the provided value and protect against ANSI color spoofing within the value

Loading…
Откажи
Сачувај