@@ -150,24 +150,7 @@ func removeBlankLines(reader io.Reader, writer io.Writer) {
150
150
}
151
151
152
152
func 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 )
171
154
172
155
if ! config .KeepBlankLines {
173
156
buf := new (bytes.Buffer )
@@ -186,8 +169,7 @@ func GenerateFile(config config.Config, containers context.Context) bool {
186
169
if err != nil {
187
170
log .Fatalf ("Unable to write to dest file %s: %s\n " , config .Dest , err )
188
171
}
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 ))
191
173
return true
192
174
}
193
175
return false
0 commit comments