ref: 97c1866e322284dec46db6f3d235807507f5b69f
parent: 8969331f5be352939883074034adac6b7086ddc8
author: Bjørn Erik Pedersen <[email protected]>
date: Sun Jan 7 05:53:45 EST 2018
resource: Resources.ByType should return Resources Currently it returns []Resource. This way the invocations can be nested. Fixes #4234
--- a/resource/resource.go
+++ b/resource/resource.go
@@ -55,8 +55,8 @@
// 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 {