@@ -55,7 +55,7 @@ func contains(item map[string]string, key string) bool {
5555 return false
5656}
5757
58- func generateFile (config Config , containers [] * RuntimeContainer ) bool {
58+ func generateFile (config Config , containers Context ) bool {
5959 templatePath := config .Template
6060 tmpl , err := template .New (filepath .Base (templatePath )).Funcs (template.FuncMap {
6161 "contains" : contains ,
@@ -68,7 +68,7 @@ func generateFile(config Config, containers []*RuntimeContainer) bool {
6868 log .Fatalf ("unable to parse template: %s" , err )
6969 }
7070
71- filteredContainers := [] * RuntimeContainer {}
71+ filteredContainers := Context {}
7272 if config .OnlyPublished {
7373 for _ , container := range containers {
7474 if len (container .PublishedAddresses ()) > 0 {
@@ -99,7 +99,7 @@ func generateFile(config Config, containers []*RuntimeContainer) bool {
9999
100100 var buf bytes.Buffer
101101 multiwriter := io .MultiWriter (dest , & buf )
102- err = tmpl .ExecuteTemplate (multiwriter , filepath .Base (templatePath ), filteredContainers )
102+ err = tmpl .ExecuteTemplate (multiwriter , filepath .Base (templatePath ), & filteredContainers )
103103 if err != nil {
104104 log .Fatalf ("template error: %s\n " , err )
105105 }
0 commit comments