This commit is contained in:
mr
2024-07-18 15:15:01 +02:00
parent 33c284cd4c
commit 6d104288b7
3 changed files with 40 additions and 25 deletions

View File

@@ -26,8 +26,17 @@ var str = [...]string{
"workflow",
}
func ToString(r ResourceType) string {
return str[r]
func FromInt(i int) string {
return str[i]
}
func (d ResourceType) String() string {
return str[d]
}
// EnumIndex - Creating common behavior-give the type a EnumIndex functio
func (d ResourceType) EnumIndex() int {
return int(d)
}
type Resource interface {