From b64617fe4f90da030bcf4a9c5a4913393ce96b14 Mon Sep 17 00:00:00 2001 From: Bjørn Erik Pedersen Date: Mon, 12 Aug 2019 16:43:37 +0200 Subject: Add resources.Match and resources.GetMatch Fix #6190 --- resources/resource/resources.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'resources/resource') diff --git a/resources/resource/resources.go b/resources/resource/resources.go index 5c661c24e..ac5dd0b2b 100644 --- a/resources/resource/resources.go +++ b/resources/resource/resources.go @@ -17,7 +17,7 @@ import ( "fmt" "strings" - "github.com/gohugoio/hugo/resources/internal" + "github.com/gohugoio/hugo/hugofs/glob" ) // Resources represents a slice of resources, which can be a mix of different types. @@ -44,7 +44,7 @@ func (r Resources) ByType(tp string) Resources { // GetMatch finds the first Resource matching the given pattern, or nil if none found. // See Match for a more complete explanation about the rules used. func (r Resources) GetMatch(pattern string) Resource { - g, err := internal.GetGlob(pattern) + g, err := glob.GetGlob(pattern) if err != nil { return nil } @@ -68,7 +68,7 @@ func (r Resources) GetMatch(pattern string) Resource { // path relative to the bundle root with Unix style slashes (/) and no leading slash, e.g. "images/logo.png". // See https://github.com/gobwas/glob for the full rules set. func (r Resources) Match(pattern string) Resources { - g, err := internal.GetGlob(pattern) + g, err := glob.GetGlob(pattern) if err != nil { return nil } -- cgit v1.2.3