diff options
author | Bjørn Erik Pedersen <[email protected]> | 2019-08-12 16:43:37 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2019-08-13 11:44:20 +0200 |
commit | b64617fe4f90da030bcf4a9c5a4913393ce96b14 (patch) | |
tree | 07240dbf51bb4afef9ea063f2310c1617be6bb0a /resources/resource | |
parent | 17ca8f0c4c636752fb9da2ad551679275dc03dd3 (diff) | |
download | hugo-b64617fe4f90da030bcf4a9c5a4913393ce96b14.tar.gz hugo-b64617fe4f90da030bcf4a9c5a4913393ce96b14.zip |
Add resources.Match and resources.GetMatch
Fix #6190
Diffstat (limited to 'resources/resource')
-rw-r--r-- | resources/resource/resources.go | 6 |
1 files changed, 3 insertions, 3 deletions
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 } |