mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05: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:
parent
8969331f5b
commit
97c1866e32
1 changed files with 2 additions and 2 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue