From d8175ddf949a5dcd49cf9879fe971c9da803407e Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sat, 29 Aug 2020 11:16:40 -0400 Subject: Only open output files when necessary Signed-off-by: Dave Henderson --- gomplate_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gomplate_test.go') 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) -- cgit v1.2.3