KVListFormat
shadow's the Key if It is not a valid string
#331
Labels
kind/bug
Categorizes issue or PR as related to a bug.
/kind bug
What steps did you take and what happened:
While trying to take a stab at #275 I noticed that there is a lingering issue in the
KVListFormat
function in terms of how it processes the keysklog/internal/serialize/keyvalues.go
Lines 112 to 118 in 9c48b7d
In case if the
key
passed to theKVListFormat
is not of string type, this ends up consuming the key and only printing the value.What did you expect to happen:
Based on the current comment/code, the expectation is that it will log the struct using
fmt.Sprintf("%s", k)
however, this is not working due to variable getting shadow'ed.Anything else you would like to add:
NA
The text was updated successfully, but these errors were encountered: