Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCameron Moore <moorereason@gmail.com>2016-05-08 00:34:53 +0300
committerCameron Moore <moorereason@gmail.com>2016-06-26 01:57:05 +0300
commite2aea65170985d7428c468ce0591557ad95af884 (patch)
tree2c7e21e00b2b57f829426a690442095e46e73483 /transform
parent29ca323a34e8f6e673c70a1af9c9f95a916229bd (diff)
helpers: Remove ToReader funcs
Remove StringToReader and BytesToReader in favor of using the stdlib directly.
Diffstat (limited to 'transform')
-rw-r--r--transform/chain_test.go7
-rw-r--r--transform/livereloadinject_test.go4
2 files changed, 6 insertions, 5 deletions
diff --git a/transform/chain_test.go b/transform/chain_test.go
index a0ae358d6..5200baa18 100644
--- a/transform/chain_test.go
+++ b/transform/chain_test.go
@@ -15,11 +15,12 @@ package transform
import (
"bytes"
- "github.com/spf13/hugo/helpers"
- "github.com/stretchr/testify/assert"
"path/filepath"
"strings"
"testing"
+
+ "github.com/spf13/hugo/helpers"
+ "github.com/stretchr/testify/assert"
)
const (
@@ -148,7 +149,7 @@ func TestChaingMultipleTransformers(t *testing.T) {
tr := NewChain(f1, f2, f3, f4)
out := new(bytes.Buffer)
- if err := tr.Apply(out, helpers.StringToReader("Test: f4 f3 f1 f2 f1 The End."), []byte("")); err != nil {
+ if err := tr.Apply(out, strings.NewReader("Test: f4 f3 f1 f2 f1 The End."), []byte("")); err != nil {
t.Errorf("Multi transformer chain returned an error: %s", err)
}
diff --git a/transform/livereloadinject_test.go b/transform/livereloadinject_test.go
index 5aea8689c..cf618e9ee 100644
--- a/transform/livereloadinject_test.go
+++ b/transform/livereloadinject_test.go
@@ -16,7 +16,7 @@ package transform
import (
"bytes"
"fmt"
- "github.com/spf13/hugo/helpers"
+ "strings"
"testing"
)
@@ -27,7 +27,7 @@ func TestLiveReloadInject(t *testing.T) {
func doTestLiveReloadInject(t *testing.T, bodyEndTag string) {
out := new(bytes.Buffer)
- in := helpers.StringToReader(bodyEndTag)
+ in := strings.NewReader(bodyEndTag)
tr := NewChain(LiveReloadInject)
tr.Apply(out, in, []byte("path"))