type apiLifecycleDeprecated … type apiLifecycleRemoved … type apiLifecycleReplacement … var leadingDigits … // MajorMinor parses a numeric major/minor version from the provided version info. // The minor version drops all characters after the first non-digit character: // // version.Info{Major:"1", Minor:"2+"} -> 1,2 // version.Info{Major:"1", Minor:"2.3-build4"} -> 1,2 func MajorMinor(v version.Info) (int, int, error) { … } // IsDeprecated returns true if obj implements APILifecycleDeprecated() and returns // a major/minor version that is non-zero and is <= the specified current major/minor version. func IsDeprecated(obj runtime.Object, currentMajor, currentMinor int) bool { … } // RemovedRelease returns the major/minor version in which the given object is unavailable (in the form "<major>.<minor>") // if the object implements APILifecycleRemoved() to indicate a non-zero removal version, and returns an empty string otherwise. func RemovedRelease(obj runtime.Object) string { … } // WarningMessage returns a human-readable deprecation warning if the object implements APILifecycleDeprecated() // to indicate a non-zero deprecated major/minor version and has a populated GetObjectKind().GroupVersionKind(). func WarningMessage(obj runtime.Object) string { … }