Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Rename Data to PluginData
Browse files Browse the repository at this point in the history
This makes it easier to distinguish between Node data (which is stored
in Node.Data) and PuginData
  • Loading branch information
JonasPf committed Dec 25, 2019
1 parent 7ce2f6f commit bfb7a25
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions pkg/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ func (bm *BasicManager) createContainer(ctx context.Context, container Container
// Environment variables
var envs []string
var err error

if container.EnvFilename != "" {
envs, err = readLines(bm.addBasePath(container.EnvFilename))
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugin/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func (d DockerPlugin) CreateConfigs(currentNode node.Node) error {
}
return template.ConfigFilesRendered(d.configFilesAndTemplates, template.TemplateData{
Node: currentNode,
Data: map[string]interface{}{
PluginData: map[string]interface{}{
"Containers": d.containers,
},
})
Expand Down
4 changes: 2 additions & 2 deletions pkg/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
)

type TemplateData struct {
Node node.Node
Data map[string]interface{} // This allows plugins to add additional data. E.g. a docker plugin can add container data
Node node.Node
PluginData map[string]interface{} // This allows plugins to add additional data. E.g. a docker plugin can add container data
}

// ConfigFileRendered renders a template with node confguration and writes it to disk if it doesn't exist yet
Expand Down

0 comments on commit bfb7a25

Please sign in to comment.