code: func (r Resources) ByType(tp string) Resources {
  	var filtered Resources
  
  	for _, resource := range r {
  		if resource.ResourceType() == tp {
  			filtered = append(filtered, resource)
  		}
  	}
  	return filtered
  }
docs: // ByType returns resources of a given resource type (ie. "image").