mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
Change the order of Apply to be more Unixy
Typically the destination is on the left and the src is on the right.
This commit is contained in:
@@ -13,11 +13,11 @@ func NewChain(trs ...Transformer) Transformer {
|
||||
return &chain{transformers: trs}
|
||||
}
|
||||
|
||||
func (c *chain) Apply(r io.Reader, w io.Writer) (err error) {
|
||||
func (c *chain) Apply(w io.Writer, r io.Reader) (err error) {
|
||||
in := r
|
||||
for _, tr := range c.transformers {
|
||||
out := new(bytes.Buffer)
|
||||
err = tr.Apply(in, out)
|
||||
err = tr.Apply(out, in)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user