The IntKeyEncoder.Encode function panics if the input math.Int is nil or negative. This could lead to unexpected crashes if invalid input is provided. Consider returning an error instead of panicking to allow for more robust error handling in calling code.
Originally posted by @gemini-code-assist[bot] in #2490 (comment)
