1
0
Fork 0
mirror of https://github.com/imjasonh/client-go2 synced 2026-07-08 09:05:38 +00:00
This commit is contained in:
Jason Hall 2021-09-09 16:19:39 -04:00
parent 59f526eccf
commit 5539a6fa1d

View file

@ -34,6 +34,7 @@ func (c client[T]) gvr() schema.GroupVersionResource {
// BOOM!
// This panics because T is a nil *corev1.Pod; the runtime.Object interface is only satisfied by *corev1.Pod, not the instantiable corev1.Pod.
// https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md#pointer-method-example
// https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md#no-way-to-require-pointer-methods
var t T
gvk := t.GetObjectKind().GroupVersionKind()
return schema.GroupVersionResource{