Unverified Commit 864a3c26 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #55523 from chenpengdev/patch-4

Automatic merge from submit-queue. 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>. move IsMissingVersion comments **What this PR does / why we need it**: **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**: **Release note**: ```release-note ```
parents 8c005ddd 9debf3bb
...@@ -94,8 +94,6 @@ type missingVersionErr struct { ...@@ -94,8 +94,6 @@ type missingVersionErr struct {
data string data string
} }
// IsMissingVersion returns true if the error indicates that the provided object
// is missing a 'Version' field.
func NewMissingVersionErr(data string) error { func NewMissingVersionErr(data string) error {
return &missingVersionErr{data} return &missingVersionErr{data}
} }
...@@ -104,6 +102,8 @@ func (k *missingVersionErr) Error() string { ...@@ -104,6 +102,8 @@ func (k *missingVersionErr) Error() string {
return fmt.Sprintf("Object 'apiVersion' is missing in '%s'", k.data) return fmt.Sprintf("Object 'apiVersion' is missing in '%s'", k.data)
} }
// IsMissingVersion returns true if the error indicates that the provided object
// is missing a 'Version' field.
func IsMissingVersion(err error) bool { func IsMissingVersion(err error) bool {
if err == nil { if err == nil {
return false return false
......
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