diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2024-01-22 09:06:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-22 09:06:33 -0500 |
| commit | 0ac3aa24bf2e4ada9c26fd9ef5b7f0ae8c6b6cfb (patch) | |
| tree | 9a95f27eec1e77ef8bfefcb2810f7e41681627a5 /gomplate_test.go | |
| parent | f837061f953bda1e8b42095c6dba0496de11d993 (diff) | |
Use go-fsimpl to read from datasources (#1336)
* Use go-fsimpl to read from datasources
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
* trying to fix windows bug
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
* attempts to fix some of the path madness
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
* remove 'HOME' from expected env vars
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
* more tweaks
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
* lint fix
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
---------
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'gomplate_test.go')
| -rw-r--r-- | gomplate_test.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gomplate_test.go b/gomplate_test.go index 2485e7af..62ae4525 100644 --- a/gomplate_test.go +++ b/gomplate_test.go @@ -12,6 +12,7 @@ import ( "github.com/hairyhenderson/gomplate/v4/conv" "github.com/hairyhenderson/gomplate/v4/data" "github.com/hairyhenderson/gomplate/v4/env" + "github.com/hairyhenderson/gomplate/v4/internal/parsers" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -73,7 +74,7 @@ func TestEc2MetaTemplates_WithJSON(t *testing.T) { Funcs: template.FuncMap{ "ec2meta": ec2meta.Meta, "ec2dynamic": ec2meta.Dynamic, - "json": data.JSON, + "json": parsers.JSON, }, }) @@ -84,7 +85,7 @@ func TestEc2MetaTemplates_WithJSON(t *testing.T) { func TestJSONArrayTemplates(t *testing.T) { g := NewRenderer(Options{ Funcs: template.FuncMap{ - "jsonArray": data.JSONArray, + "jsonArray": parsers.JSONArray, }, }) @@ -95,8 +96,8 @@ func TestJSONArrayTemplates(t *testing.T) { func TestYAMLTemplates(t *testing.T) { g := NewRenderer(Options{ Funcs: template.FuncMap{ - "yaml": data.YAML, - "yamlArray": data.YAMLArray, + "yaml": parsers.YAML, + "yamlArray": parsers.YAMLArray, }, }) @@ -108,7 +109,7 @@ func TestYAMLTemplates(t *testing.T) { func TestHasTemplate(t *testing.T) { g := NewRenderer(Options{ Funcs: template.FuncMap{ - "yaml": data.YAML, + "yaml": parsers.YAML, "has": conv.Has, }, }) |
