move IsMissingVersion comments

This commit is contained in:
chenpengdev 2017-11-11 14:37:14 +08:00 committed by GitHub
parent 7684fa2ef0
commit 9debf3bbc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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