diff options
author | Bjørn Erik Pedersen <[email protected]> | 2019-09-04 14:07:10 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2019-09-04 17:24:50 +0200 |
commit | bb894ceaf8d3655dd14bc63bf4a4557e3a16f530 (patch) | |
tree | 1aa9eab6cd4b10f81a0d382a6c009147333d1df7 /tpl | |
parent | 529c7f1090e16c1bcff39948a8a5f4ed054650fb (diff) | |
download | hugo-bb894ceaf8d3655dd14bc63bf4a4557e3a16f530.tar.gz hugo-bb894ceaf8d3655dd14bc63bf4a4557e3a16f530.zip |
Allow slices in the image Filter funcs, not just varargs
[ci skip]
See #6255
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/images/images.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/tpl/images/images.go b/tpl/images/images.go index b64456876..1d12aea72 100644 --- a/tpl/images/images.go +++ b/tpl/images/images.go @@ -18,8 +18,6 @@ import ( "image" "sync" - "github.com/disintegration/gift" - "github.com/pkg/errors" "github.com/gohugoio/hugo/resources/images" @@ -101,10 +99,6 @@ func (ns *Namespace) Filter(args ...interface{}) (resource.Image, error) { img := args[len(args)-1].(resource.Image) filtersv := args[:len(args)-1] - filters := make([]gift.Filter, len(filtersv)) - for i, f := range filtersv { - filters[i] = f.(gift.Filter) - } - return img.Filter(filters...) + return img.Filter(filtersv...) } |