From d25f44285ae4e701a2ad9c97fbd22320a23a81eb Mon Sep 17 00:00:00 2001 From: zeripath Date: Thu, 23 Jul 2020 10:26:45 +0100 Subject: [PATCH] Fix double-indirection bug in logging IDs (#12294) 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 --- modules/log/colors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/log/colors.go b/modules/log/colors.go index 282d0c919..d8e577673 100644 --- a/modules/log/colors.go +++ b/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