Skip to content

Commit 97c1866

Browse files
committed
resource: Resources.ByType should return Resources
Currently it returns []Resource. This way the invocations can be nested. Fixes #4234
1 parent 8969331 commit 97c1866

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎resource/resource.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ type Resource interface {
5555
// I.e. both pages and images etc.
5656
type Resources []Resource
5757

58-
func (r Resources) ByType(tp string) []Resource {
59-
var filtered []Resource
58+
func (r Resources) ByType(tp string) Resources {
59+
var filtered Resources
6060

6161
for _, resource := range r {
6262
if resource.ResourceType() == tp {

0 commit comments

Comments
 (0)