mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
move IsMissingVersion comments
This commit is contained in:
parent
7684fa2ef0
commit
9debf3bbc7
@ -94,8 +94,6 @@ type missingVersionErr struct {
|
||||
data string
|
||||
}
|
||||
|
||||
// IsMissingVersion returns true if the error indicates that the provided object
|
||||
// is missing a 'Version' field.
|
||||
func NewMissingVersionErr(data string) error {
|
||||
return &missingVersionErr{data}
|
||||
}
|
||||
@ -104,6 +102,8 @@ func (k *missingVersionErr) Error() string {
|
||||
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 {
|
||||
if err == nil {
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user