From d926528f7280314985dc9bed1dc5e349f7d1f600 Mon Sep 17 00:00:00 2001 From: "Mark S. Lewis" Date: Tue, 5 May 2026 11:07:11 +0100 Subject: [PATCH] Use reflect.Pointer instead of reflect.Ptr reflect.Pointer replaced reflect.Ptr in Go 1.18. For backwards compatibility, reflect.Ptr is a constant with the value of reflect.Pointer. The use of this constant triggers a lint failure as it should be inlined. This can be avoided by using the preferred reflect.Pointer constant. Signed-off-by: Mark S. Lewis --- internal/configtxgen/viperutil/config_util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/configtxgen/viperutil/config_util.go b/internal/configtxgen/viperutil/config_util.go index 283ddb2..d9b3b92 100644 --- a/internal/configtxgen/viperutil/config_util.go +++ b/internal/configtxgen/viperutil/config_util.go @@ -454,7 +454,7 @@ func bccspHook(f reflect.Type, t reflect.Type, data interface{}) (interface{}, e // the time.Duration type func (c *ConfigParser) EnhancedExactUnmarshal(output interface{}) error { oType := reflect.TypeOf(output) - if oType.Kind() != reflect.Ptr { + if oType.Kind() != reflect.Pointer { return errors.New("supplied output argument must be a pointer to a struct but is not pointer") } eType := oType.Elem()