Permalink
Browse files

resource: Resources.ByType should return Resources

Currently it returns []Resource.

This way the invocations can be nested.

Fixes #4234
  • Loading branch information...
bep committed Jan 7, 2018
1 parent 8969331 commit 97c1866e322284dec46db6f3d235807507f5b69f
Showing with 2 additions and 2 deletions.
  1. +2 −2 resource/resource.go
View
@@ -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 {

0 comments on commit 97c1866

Please sign in to comment.