Unverified Commit 9debf3bb authored by chenpengdev's avatar chenpengdev Committed by GitHub

move IsMissingVersion comments

parent 7684fa2e
...@@ -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