summaryrefslogtreecommitdiff
path: root/gomplate_test.go
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2020-08-29 11:16:40 -0400
committerDave Henderson <dhenderson@gmail.com>2020-08-29 13:49:05 -0400
commitd8175ddf949a5dcd49cf9879fe971c9da803407e (patch)
tree4091a0c72f8e0bd1cbe65cffea050ffa27b9dd6d /gomplate_test.go
parent611951c31d6efb86085a50768e91820ba2efee70 (diff)
Only open output files when necessary
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'gomplate_test.go')
-rw-r--r--gomplate_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/gomplate_test.go b/gomplate_test.go
index 0142aae0..1d569958 100644
--- a/gomplate_test.go
+++ b/gomplate_test.go
@@ -16,7 +16,7 @@ import (
"github.com/hairyhenderson/gomplate/v3/conv"
"github.com/hairyhenderson/gomplate/v3/data"
"github.com/hairyhenderson/gomplate/v3/env"
- "github.com/hairyhenderson/gomplate/v3/internal/writers"
+ "github.com/hairyhenderson/gomplate/v3/internal/iohelpers"
"github.com/stretchr/testify/assert"
)
@@ -158,7 +158,7 @@ func TestCustomDelim(t *testing.T) {
func TestRunTemplates(t *testing.T) {
defer func() { Stdout = os.Stdout }()
buf := &bytes.Buffer{}
- Stdout = &writers.NopCloser{Writer: buf}
+ Stdout = &iohelpers.NopCloser{Writer: buf}
config := &Config{Input: "foo", OutputFiles: []string{"-"}}
err := RunTemplates(config)
assert.NoError(t, err)