aboutsummaryrefslogtreecommitdiff
path: root/vendor/k8s.io/apimachinery/pkg/conversion/converter.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-28 08:23:59 -0400
committerGitHub <noreply@github.com>2020-08-28 08:23:59 -0400
commit74bdf52c401dd1c9cd3c636d4fa8ea94e7c88ef3 (patch)
treeaf0904e9ec643dea2caa8d39a55764adc38c069f /vendor/k8s.io/apimachinery/pkg/conversion/converter.go
parent061c93f70101026d79cca6e75ac0c565e1fa99ec (diff)
parent90a86cad3a6f007c6708406d8a78528fbb302a0a (diff)
downloadpodman-74bdf52c401dd1c9cd3c636d4fa8ea94e7c88ef3.tar.gz
podman-74bdf52c401dd1c9cd3c636d4fa8ea94e7c88ef3.tar.bz2
podman-74bdf52c401dd1c9cd3c636d4fa8ea94e7c88ef3.zip
Merge pull request #7472 from containers/dependabot/go_modules/k8s.io/apimachinery-0.19.0
Bump k8s.io/apimachinery from 0.18.8 to 0.19.0
Diffstat (limited to 'vendor/k8s.io/apimachinery/pkg/conversion/converter.go')
-rw-r--r--vendor/k8s.io/apimachinery/pkg/conversion/converter.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/k8s.io/apimachinery/pkg/conversion/converter.go b/vendor/k8s.io/apimachinery/pkg/conversion/converter.go
index 2d7c8bd1e..838d5b0aa 100644
--- a/vendor/k8s.io/apimachinery/pkg/conversion/converter.go
+++ b/vendor/k8s.io/apimachinery/pkg/conversion/converter.go
@@ -442,20 +442,20 @@ func (c *Converter) doConversion(src, dest interface{}, flags FieldMatchingFlags
if fn, ok := c.generatedConversionFuncs.untyped[pair]; ok {
return fn(src, dest, scope)
}
- // TODO: consider everything past this point deprecated - we want to support only point to point top level
- // conversions
dv, err := EnforcePtr(dest)
if err != nil {
return err
}
- if !dv.CanAddr() && !dv.CanSet() {
- return fmt.Errorf("can't write to dest")
- }
sv, err := EnforcePtr(src)
if err != nil {
return err
}
+ return fmt.Errorf("converting (%s) to (%s): unknown conversion", sv.Type(), dv.Type())
+
+ // TODO: Everything past this point is deprecated.
+ // Remove in 1.20 once we're sure it didn't break anything.
+
// Leave something on the stack, so that calls to struct tag getters never fail.
scope.srcStack.push(scopeStackElem{})
scope.destStack.push(scopeStackElem{})