♻️ Use ResourceType enum in GetByType Resources filter as is
This commit is contained in:
parent
771f8721ca
commit
28228684ef
|
@ -6,14 +6,9 @@ import (
|
|||
|
||||
type Resources []*Resource
|
||||
|
||||
func (r Resources) GetType(targetType string) Resources {
|
||||
func (r Resources) GetType(target ResourceType) Resources {
|
||||
out := make(Resources, 0, len(r))
|
||||
|
||||
target, err := ParseResourceType(targetType)
|
||||
if err != nil {
|
||||
return out
|
||||
}
|
||||
|
||||
for i := range r {
|
||||
if r[i].resourceType != target {
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue