From b54e43d555a984145cfbdf186cfe9a8b344c0510 Mon Sep 17 00:00:00 2001 From: Pranshu Srivastava Date: Fri, 17 Feb 2023 18:12:22 +0530 Subject: [PATCH] fixup! Don't crash on non-existent path values --- pkg/customresourcestate/registry_factory.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/customresourcestate/registry_factory.go b/pkg/customresourcestate/registry_factory.go index ca825f26d6..9b4674d9de 100644 --- a/pkg/customresourcestate/registry_factory.go +++ b/pkg/customresourcestate/registry_factory.go @@ -434,7 +434,7 @@ func (c compiledGauge) value(it interface{}) (*eachValue, error) { if it == nil { return nil, fmt.Errorf("got nil while resolving path") } - // Don't error if there was not a type-casting issue (`toFloat64`), but rather a failed lookup. + // Don't error if there was not a type-casting issue (`toFloat64`). return nil, nil } value, err := toFloat64(got, c.NilIsZero)