mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
resource: Resources.ByType should return Resources
Currently it returns []Resource. This way the invocations can be nested. Fixes #4234
This commit is contained in:
@@ -55,8 +55,8 @@ type Resource interface {
|
||||
// I.e. both pages and images etc.
|
||||
type Resources []Resource
|
||||
|
||||
func (r Resources) ByType(tp string) []Resource {
|
||||
var filtered []Resource
|
||||
func (r Resources) ByType(tp string) Resources {
|
||||
var filtered Resources
|
||||
|
||||
for _, resource := range r {
|
||||
if resource.ResourceType() == tp {
|
||||
|
Reference in New Issue
Block a user