Add specific errors for missing kind and version.

This commit is contained in:
Brendan Burns
2015-02-24 20:15:17 -08:00
parent eefaafc214
commit 877f605dc0
2 changed files with 44 additions and 0 deletions

View File

@@ -25,3 +25,15 @@ import (
func IsNotRegisteredError(err error) bool {
return conversion.IsNotRegisteredError(err)
}
// IsMissingKind returns true if the error indicates that the provided object
// is missing a 'Kind' field.
func IsMissingKind(err error) bool {
return conversion.IsMissingKind(err)
}
// IsMissingVersion returns true if the error indicates that the provided object
// is missing a 'Versioj' field.
func IsMissingVersion(err error) bool {
return conversion.IsMissingVersion(err)
}