From 81391ef1015ad9697a32431f3e19b258b5367c74 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Wed, 10 Sep 2025 10:20:44 -0400 Subject: [PATCH] testutil: Print instead of crashing on invalid value --- internal/testutil/testutil.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/testutil/testutil.go b/internal/testutil/testutil.go index 1a3addd..e5a3167 100644 --- a/internal/testutil/testutil.go +++ b/internal/testutil/testutil.go @@ -119,6 +119,10 @@ type describer struct { } func (this *describer) describe(value reflect.Value) { + if !value.IsValid() { + this.printf("") + return + } value = reflect.ValueOf(value.Interface()) switch value.Kind() { case reflect.Array, reflect.Slice: