@@ -55,7 +55,7 @@ func contains(item map[string]string, key string) bool {
55
55
return false
56
56
}
57
57
58
- func generateFile (config Config , containers [] * RuntimeContainer ) bool {
58
+ func generateFile (config Config , containers Context ) bool {
59
59
templatePath := config .Template
60
60
tmpl , err := template .New (filepath .Base (templatePath )).Funcs (template.FuncMap {
61
61
"contains" : contains ,
@@ -68,7 +68,7 @@ func generateFile(config Config, containers []*RuntimeContainer) bool {
68
68
log .Fatalf ("unable to parse template: %s" , err )
69
69
}
70
70
71
- filteredContainers := [] * RuntimeContainer {}
71
+ filteredContainers := Context {}
72
72
if config .OnlyPublished {
73
73
for _ , container := range containers {
74
74
if len (container .PublishedAddresses ()) > 0 {
@@ -99,7 +99,7 @@ func generateFile(config Config, containers []*RuntimeContainer) bool {
99
99
100
100
var buf bytes.Buffer
101
101
multiwriter := io .MultiWriter (dest , & buf )
102
- err = tmpl .ExecuteTemplate (multiwriter , filepath .Base (templatePath ), filteredContainers )
102
+ err = tmpl .ExecuteTemplate (multiwriter , filepath .Base (templatePath ), & filteredContainers )
103
103
if err != nil {
104
104
log .Fatalf ("template error: %s\n " , err )
105
105
}
0 commit comments