mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-11 20:03:58 +02:00
Rename interface contentRewriter to contentTransformer
Is is a much better name.
This commit is contained in:
@@ -56,18 +56,18 @@ func TestChainZeroTransformers(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestChaingMultipleTransformers(t *testing.T) {
|
||||
f1 := func(rw contentRewriter) {
|
||||
rw.Write(bytes.Replace(rw.Content(), []byte("f1"), []byte("f1r"), -1))
|
||||
f1 := func(ct contentTransformer) {
|
||||
ct.Write(bytes.Replace(ct.Content(), []byte("f1"), []byte("f1r"), -1))
|
||||
}
|
||||
f2 := func(rw contentRewriter) {
|
||||
rw.Write(bytes.Replace(rw.Content(), []byte("f2"), []byte("f2r"), -1))
|
||||
f2 := func(ct contentTransformer) {
|
||||
ct.Write(bytes.Replace(ct.Content(), []byte("f2"), []byte("f2r"), -1))
|
||||
}
|
||||
f3 := func(rw contentRewriter) {
|
||||
rw.Write(bytes.Replace(rw.Content(), []byte("f3"), []byte("f3r"), -1))
|
||||
f3 := func(ct contentTransformer) {
|
||||
ct.Write(bytes.Replace(ct.Content(), []byte("f3"), []byte("f3r"), -1))
|
||||
}
|
||||
|
||||
f4 := func(rw contentRewriter) {
|
||||
rw.Write(bytes.Replace(rw.Content(), []byte("f4"), []byte("f4r"), -1))
|
||||
f4 := func(ct contentTransformer) {
|
||||
ct.Write(bytes.Replace(ct.Content(), []byte("f4"), []byte("f4r"), -1))
|
||||
}
|
||||
|
||||
tr := NewChain(f1, f2, f3, f4)
|
||||
|
Reference in New Issue
Block a user