|
29 | 29 | configFiles stringslice |
30 | 30 | configs ConfigFile |
31 | 31 | interval int |
| 32 | + skipBlankLines bool |
32 | 33 | endpoint string |
33 | 34 | tlsCert string |
34 | 35 | tlsKey string |
@@ -114,6 +115,7 @@ type Config struct { |
114 | 115 | OnlyExposed bool |
115 | 116 | OnlyPublished bool |
116 | 117 | Interval int |
| 118 | + SkipBlankLines bool |
117 | 119 | } |
118 | 120 |
|
119 | 121 | type ConfigFile struct { |
@@ -391,6 +393,7 @@ func initFlags() { |
391 | 393 | "send HUP signal to container. Equivalent to `docker kill -s HUP container-ID`") |
392 | 394 | flag.Var(&configFiles, "config", "config files with template directives. Config files will be merged if this option is specified multiple times.") |
393 | 395 | flag.IntVar(&interval, "interval", 0, "notify command interval (secs)") |
| 396 | + flag.BoolVar(&skipBlankLines, "skip-blank-lines", false, "skip blank lines in output file") |
394 | 397 | flag.StringVar(&endpoint, "endpoint", "", "docker api endpoint (tcp|unix://..). Default unix:///var/run/docker.sock") |
395 | 398 | flag.StringVar(&tlsCert, "tlscert", filepath.Join(certPath, "cert.pem"), "path to TLS client certificate file") |
396 | 399 | flag.StringVar(&tlsKey, "tlskey", filepath.Join(certPath, "key.pem"), "path to TLS client key file") |
@@ -431,6 +434,7 @@ func main() { |
431 | 434 | OnlyExposed: onlyExposed, |
432 | 435 | OnlyPublished: onlyPublished, |
433 | 436 | Interval: interval, |
| 437 | + SkipBlankLines: skipBlankLines, |
434 | 438 | } |
435 | 439 | if notifySigHUPContainerID != "" { |
436 | 440 | config.NotifyContainers[notifySigHUPContainerID] = docker.SIGHUP |
|
0 commit comments