From 9059f8fc10340e9965c24f13901e3939643fa3bb Mon Sep 17 00:00:00 2001 From: g4lb Date: Wed, 4 Nov 2026 16:19:54 +0200 Subject: [PATCH] Format integers with strconv in getFieldAsString fmt.Sprintf boxes each value. strconv.FormatInt and FormatUint do the same work directly. The output does not change. --- types.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types.go b/types.go index 3ace24c..ce124af 100644 --- a/types.go +++ b/types.go @@ -364,9 +364,9 @@ func getFieldAsString(field reflect.Value) (str string, err error) { return "false", nil } case int, int8, int16, int32, int64: - return fmt.Sprintf("%v", field.Int()), nil + return strconv.FormatInt(field.Int(), 10), nil case uint, uint8, uint16, uint32, uint64: - return fmt.Sprintf("%v", field.Uint()), nil + return strconv.FormatUint(field.Uint(), 10), nil case float32: str, err = toString(float32(field.Float())) if err != nil {