Skip to content

Commit

Permalink
fix: template container
Browse files Browse the repository at this point in the history
  • Loading branch information
natesales committed Sep 2, 2024
1 parent a963f3d commit 39f448c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -611,9 +611,9 @@ func peer(peerName string, peerData *config.Peer, c *config.Config, wg *sync.Wai
// Render the template and write to buffer
var b bytes.Buffer
log.Debugf("[%s] Writing config", peerName)
if err := templating.PeerTemplate.ExecuteTemplate(&b, "peer.tmpl", &templating.Wrapper{
Name: peerName,
Peer: *peerData,
if err := templating.Template.ExecuteTemplate(&b, "peer.tmpl", &templating.Wrapper{
Name: peerName,
Peer: *peerData,
Config: *c,
}); err != nil {
return fmt.Errorf("execute template: %v", err)
Expand Down Expand Up @@ -699,7 +699,7 @@ func Run(configFilename, lockFile, version string, noConfigure, dryRun, withdraw

// Render the global template and write to buffer
var globalBuffer bytes.Buffer
if err := templating.GlobalTemplate.ExecuteTemplate(&globalBuffer, "global.tmpl", c); err != nil {
if err := templating.Template.ExecuteTemplate(&globalBuffer, "global.tmpl", c); err != nil {
log.Fatalf("Execute global template: %v", err)
}

Expand Down

0 comments on commit 39f448c

Please sign in to comment.