mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
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 ```
This commit is contained in:
commit
864a3c268e
@ -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 {
|
|||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user