@@ -150,24 +150,7 @@ func removeBlankLines(reader io.Reader, writer io.Writer) {
150150}
151151
152152func GenerateFile (config config.Config , containers context.Context ) bool {
153- filteredContainers := context.Context {}
154- if config .OnlyPublished {
155- for _ , container := range containers {
156- if len (container .PublishedAddresses ()) > 0 {
157- filteredContainers = append (filteredContainers , container )
158- }
159- }
160- } else if config .OnlyExposed {
161- for _ , container := range containers {
162- if len (container .Addresses ) > 0 {
163- filteredContainers = append (filteredContainers , container )
164- }
165- }
166- } else {
167- filteredContainers = containers
168- }
169-
170- contents := executeTemplate (config .Template , filteredContainers )
153+ contents := executeTemplate (config .Template , containers )
171154
172155 if ! config .KeepBlankLines {
173156 buf := new (bytes.Buffer )
@@ -186,8 +169,7 @@ func GenerateFile(config config.Config, containers context.Context) bool {
186169 if err != nil {
187170 log .Fatalf ("Unable to write to dest file %s: %s\n " , config .Dest , err )
188171 }
189-
190- log .Printf ("Generated '%s' from %d containers" , config .Dest , len (filteredContainers ))
172+ log .Printf ("Generated '%s' from %d containers" , config .Dest , len (containers ))
191173 return true
192174 }
193175 return false
0 commit comments