summaryrefslogtreecommitdiff
path: root/render_test.go
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2024-01-25 21:14:06 -0500
committerGitHub <noreply@github.com>2024-01-25 21:14:06 -0500
commit2cc314740e4ce29739c667f0887448d6ee592542 (patch)
tree93e6768da61b137e95a1079e775117c238146a24 /render_test.go
parent562bcd95dfb6fb14af7e0b5829beccff3636d2f1 (diff)
Revert "Remove support for deprecated key/value array form of template config" (#1979)
Diffstat (limited to 'render_test.go')
-rw-r--r--render_test.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/render_test.go b/render_test.go
index f7ed38ff..ab6f58f2 100644
--- a/render_test.go
+++ b/render_test.go
@@ -11,7 +11,6 @@ import (
"testing/fstest"
"github.com/hairyhenderson/go-fsimpl"
- "github.com/hairyhenderson/gomplate/v4/internal/config"
"github.com/hairyhenderson/gomplate/v4/internal/datafs"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -45,10 +44,10 @@ func TestRenderTemplate(t *testing.T) {
t.Setenv("WORLD", "world")
tr = NewRenderer(Options{
- Context: map[string]config.DataSource{
+ Context: map[string]Datasource{
"hi": {URL: hu},
},
- Datasources: map[string]config.DataSource{
+ Datasources: map[string]Datasource{
"world": {URL: wu},
},
})
@@ -64,7 +63,7 @@ func TestRenderTemplate(t *testing.T) {
`<< . | toUpper >>`)}
tr = NewRenderer(Options{
- Templates: map[string]config.DataSource{
+ Templates: map[string]Datasource{
"nested": {URL: nu},
},
LDelim: "<<",
@@ -147,7 +146,7 @@ func ExampleRenderer_datasources() {
// a datasource that retrieves JSON from a public API
u, _ := url.Parse("https://ipinfo.io/1.1.1.1")
tr := NewRenderer(Options{
- Context: map[string]config.DataSource{
+ Context: map[string]Datasource{
"info": {URL: u},
},
})