Unverified Commit 08a094ca authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #63569 from hanxiaoshuai/bugfix0509

Automatic merge from submit-queue (batch tested with PRs 63569, 63918, 63980, 63295, 63989). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. fix a small mistake in function getFieldMeta **What this PR does / why we need it**: fix a small mistake in function getFieldMeta **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: ``` if e, found := ext["x-kubernetes-patch-strategy"]; found { strategy, ok := e.(string) if !ok { return apply.FieldMetaImpl{}, fmt.Errorf("Expected string for x-kubernetes-patch-strategy by got %T", s) } } ``` According the judgment above, I think we should print the type of e. **Release note**: ```release-note NONE ```
parents dfdfea84 c01f6a1e
...@@ -104,7 +104,7 @@ func getFieldMeta(s proto.Schema, name string) (apply.FieldMetaImpl, error) { ...@@ -104,7 +104,7 @@ func getFieldMeta(s proto.Schema, name string) (apply.FieldMetaImpl, error) {
if e, found := ext["x-kubernetes-patch-strategy"]; found { if e, found := ext["x-kubernetes-patch-strategy"]; found {
strategy, ok := e.(string) strategy, ok := e.(string)
if !ok { if !ok {
return apply.FieldMetaImpl{}, fmt.Errorf("Expected string for x-kubernetes-patch-strategy by got %T", s) return apply.FieldMetaImpl{}, fmt.Errorf("Expected string for x-kubernetes-patch-strategy by got %T", e)
} }
// Take the first strategy if there are substrategies. // Take the first strategy if there are substrategies.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment