From 8689f22821fd962e706c00b515a0779a8f17401b Mon Sep 17 00:00:00 2001 From: Jian Li Date: Thu, 2 Dec 2021 18:07:16 +0800 Subject: [PATCH] fix mapToUnstructured error message --- staging/src/k8s.io/apimachinery/pkg/runtime/converter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staging/src/k8s.io/apimachinery/pkg/runtime/converter.go b/staging/src/k8s.io/apimachinery/pkg/runtime/converter.go index b99492a891f..f1900ccfa94 100644 --- a/staging/src/k8s.io/apimachinery/pkg/runtime/converter.go +++ b/staging/src/k8s.io/apimachinery/pkg/runtime/converter.go @@ -722,7 +722,7 @@ func mapToUnstructured(sv, dv reflect.Value) error { dt = dv.Type() } if dt.Kind() != reflect.Map { - return fmt.Errorf("cannot convert struct to: %v", dt.Kind()) + return fmt.Errorf("cannot convert map to: %v", dt.Kind()) } if !st.Key().AssignableTo(dt.Key()) && !st.Key().ConvertibleTo(dt.Key()) {