summaryrefslogtreecommitdiff
path: root/vendor/k8s.io/apimachinery/pkg/conversion/queryparams
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/k8s.io/apimachinery/pkg/conversion/queryparams')
-rw-r--r--vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go
index 30f717b2c..17b366617 100644
--- a/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go
+++ b/vendor/k8s.io/apimachinery/pkg/conversion/queryparams/convert.go
@@ -90,7 +90,14 @@ func customMarshalValue(value reflect.Value) (reflect.Value, bool) {
marshaler, ok := value.Interface().(Marshaler)
if !ok {
- return reflect.Value{}, false
+ if !isPointerKind(value.Kind()) && value.CanAddr() {
+ marshaler, ok = value.Addr().Interface().(Marshaler)
+ if !ok {
+ return reflect.Value{}, false
+ }
+ } else {
+ return reflect.Value{}, false
+ }
}
// Don't invoke functions on nil pointers