mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	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 <art27@cantab.net>
This commit is contained in:
		@@ -355,7 +355,7 @@ func NewColoredValueBytes(value interface{}, colorBytes *[]byte) *ColoredValue {
 | 
				
			|||||||
// The Value will be colored with FgCyan
 | 
					// The Value will be colored with FgCyan
 | 
				
			||||||
// If a ColoredValue is provided it is not changed
 | 
					// If a ColoredValue is provided it is not changed
 | 
				
			||||||
func NewColoredIDValue(value interface{}) *ColoredValue {
 | 
					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
 | 
					// Format will format the provided value and protect against ANSI color spoofing within the value
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user