From 83de21981a96871940445678059bc34ecd8d5dd9 Mon Sep 17 00:00:00 2001 From: Ciprian Hacman Date: Fri, 30 Jun 2023 07:32:26 +0300 Subject: [PATCH] Clarify error message when overriding int and uint values --- util/pkg/reflectutils/access.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/pkg/reflectutils/access.go b/util/pkg/reflectutils/access.go index b00f9a66e0..482ff2df3b 100644 --- a/util/pkg/reflectutils/access.go +++ b/util/pkg/reflectutils/access.go @@ -162,7 +162,7 @@ func setType(v reflect.Value, newValue string) error { v64 := int64(v) newV = reflect.ValueOf(v64) default: - panic("missing case in switch") + panic("missing case in int switch") } case "uint64", "uint32", "uint16", "uint": v, err := strconv.Atoi(newValue) @@ -183,7 +183,7 @@ func setType(v reflect.Value, newValue string) error { v64 := uint64(v) newV = reflect.ValueOf(v64) default: - panic("missing case in switch") + panic("missing case in uint switch") } case "intstr.IntOrString": newV = reflect.ValueOf(intstr.Parse(newValue))