code: func (commonResource) Slice(in interface{}) (interface{}, error) {
  	switch items := in.(type) {
  	case resource.Resources:
  		return items, nil
  	case []interface{}:
  		groups := make(resource.Resources, len(items))
  		for i, v := range items {
  			g, ok := v.(resource.Resource)
  			if !ok {
  				return nil, fmt.Errorf("type %T is not a Resource", v)
  			}
  			groups[i] = g
  		}
  		return groups, nil
  	default:
  		return nil, fmt.Errorf("invalid slice type %T", items)
  	}
  }
docs: // Slice is not meant to be used externally. It's a bridge function
  // for the template functions. See collections.Slice.