summaryrefslogtreecommitdiff
path: root/gomplate.go
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2024-01-22 09:06:33 -0500
committerGitHub <noreply@github.com>2024-01-22 09:06:33 -0500
commit0ac3aa24bf2e4ada9c26fd9ef5b7f0ae8c6b6cfb (patch)
tree9a95f27eec1e77ef8bfefcb2810f7e41681627a5 /gomplate.go
parentf837061f953bda1e8b42095c6dba0496de11d993 (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.go')
-rw-r--r--gomplate.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/gomplate.go b/gomplate.go
index f95dc2a3..b1312a34 100644
--- a/gomplate.go
+++ b/gomplate.go
@@ -11,8 +11,8 @@ import (
"text/template"
"time"
- "github.com/hairyhenderson/gomplate/v4/data"
"github.com/hairyhenderson/gomplate/v4/internal/config"
+ "github.com/hairyhenderson/gomplate/v4/internal/datafs"
)
// RunTemplates - run all gomplate templates specified by the given configuration
@@ -46,7 +46,7 @@ func Run(ctx context.Context, cfg *config.Config) error {
}
// if a custom Stdin is set in the config, inject it into the context now
- ctx = data.ContextWithStdin(ctx, cfg.Stdin)
+ ctx = datafs.ContextWithStdin(ctx, cfg.Stdin)
opts := optionsFromConfig(cfg)
opts.Funcs = funcMap
@@ -87,7 +87,6 @@ func simpleNamer(outDir string) func(ctx context.Context, inPath string) (string
func mappingNamer(outMap string, tr *Renderer) func(context.Context, string) (string, error) {
return func(ctx context.Context, inPath string) (string, error) {
- tr.data.Ctx = ctx
tcontext, err := createTmplContext(ctx, tr.tctxAliases, tr.data)
if err != nil {
return "", err