Skip to content

Commit

Permalink
Fix double-indirection bug in logging IDs (#12294) (#12308)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
techknowlogick and zeripath authored Jul 23, 2020
1 parent 64eaa2a commit 8d1cd4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/log/colors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8d1cd4d

Please sign in to comment.