mirror of https://github.com/k3s-io/k3s
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 ```pull/8/head
commit
08a094ca2e
|
@ -104,7 +104,7 @@ func getFieldMeta(s proto.Schema, name string) (apply.FieldMetaImpl, error) {
|
|||
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)
|
||||
return apply.FieldMetaImpl{}, fmt.Errorf("Expected string for x-kubernetes-patch-strategy by got %T", e)
|
||||
}
|
||||
|
||||
// Take the first strategy if there are substrategies.
|
||||
|
|
Loading…
Reference in New Issue