summaryrefslogtreecommitdiff
path: root/template_test.go
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2018-02-18 23:25:43 -0500
committerDave Henderson <dhenderson@gmail.com>2018-04-18 15:23:49 -0400
commit0ff06aa75c6a3062852f08c0ae73751530ede6c3 (patch)
tree01002e4c015ee950f3b63c6584ebb8462eaf9b87 /template_test.go
parentcd60ef2d97a45135f3b4127ea0038db5a4ffe847 (diff)
Putting main pkg in cmd subdirectory
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'template_test.go')
-rw-r--r--template_test.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/template_test.go b/template_test.go
index 5599acb4..66863b50 100644
--- a/template_test.go
+++ b/template_test.go
@@ -1,6 +1,6 @@
// +build !windows
-package main
+package gomplate
import (
"bytes"
@@ -153,30 +153,30 @@ func TestGatherTemplates(t *testing.T) {
afero.WriteFile(fs, "in/2", []byte("bar"), 0644)
afero.WriteFile(fs, "in/3", []byte("baz"), 0644)
- templates, err := gatherTemplates(&GomplateOpts{})
+ templates, err := gatherTemplates(&Config{})
assert.NoError(t, err)
assert.Len(t, templates, 0)
- templates, err = gatherTemplates(&GomplateOpts{
- input: "foo",
+ templates, err = gatherTemplates(&Config{
+ Input: "foo",
})
assert.NoError(t, err)
assert.Len(t, templates, 1)
assert.Equal(t, "foo", templates[0].contents)
assert.Equal(t, stdout, templates[0].target)
- templates, err = gatherTemplates(&GomplateOpts{
- inputFiles: []string{"foo"},
- outputFiles: []string{"out"},
+ templates, err = gatherTemplates(&Config{
+ InputFiles: []string{"foo"},
+ OutputFiles: []string{"out"},
})
assert.NoError(t, err)
assert.Len(t, templates, 1)
assert.Equal(t, "bar", templates[0].contents)
assert.NotEqual(t, stdout, templates[0].target)
- templates, err = gatherTemplates(&GomplateOpts{
- inputDir: "in",
- outputDir: "out",
+ templates, err = gatherTemplates(&Config{
+ InputDir: "in",
+ OutputDir: "out",
})
assert.NoError(t, err)
assert.Len(t, templates, 3)