Deprecate taxonomyTerm

In favour of 'taxonomy'

Closes #11256
This commit is contained in:
Bjørn Erik Pedersen
2023-07-28 12:18:59 +02:00
parent 1c97095ac0
commit bec9b80d95
4 changed files with 66 additions and 7 deletions

View File

@@ -93,3 +93,15 @@ func GetKindAny(s string) string {
}
return kindMapTemporary[strings.ToLower(s)]
}
// IsDeprecatedAndReplacedWith returns the new kind if the given kind is deprecated.
func IsDeprecatedAndReplacedWith(s string) string {
s = strings.ToLower(s)
switch s {
case "taxonomyterm":
return KindTaxonomy
default:
return ""
}
}