Skip to content

Commit

Permalink
chore: rename template file
Browse files Browse the repository at this point in the history
  • Loading branch information
giautm committed Nov 26, 2023
1 parent 699b4a9 commit dadb332
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions internal/provider/template.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package provider

import (
_ "embed"
"embed"
"os"
"text/template"
)
Expand Down Expand Up @@ -32,10 +32,11 @@ type (
)

var (
//go:embed config/migrate.tmpl
cfgMigrate string
cfgMigrateTmpl = template.Must(template.New("migrate").
Parse(cfgMigrate))
//go:embed templates/*.tmpl
tmpls embed.FS
tmpl = template.Must(template.New("terraform").
ParseFS(tmpls, "templates/*.tmpl"),
)
)

// CreateFile writes the template data to
Expand All @@ -46,5 +47,5 @@ func (d *templateData) CreateFile(name string) error {
return err
}
defer f.Close()
return cfgMigrateTmpl.Execute(f, d)
return tmpl.ExecuteTemplate(f, "atlas_migration.tmpl", d)
}
File renamed without changes.

0 comments on commit dadb332

Please sign in to comment.