From 1beb5005d11b8fadd04e51c4a1341779d26a475d Mon Sep 17 00:00:00 2001 From: "Guillaume J. Charmes" Date: Tue, 26 Nov 2013 17:47:58 +0000 Subject: [PATCH] Format main() --- docker/docker.go | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/docker/docker.go b/docker/docker.go index 3f9be0a92a..43b93dc2f4 100644 --- a/docker/docker.go +++ b/docker/docker.go @@ -23,23 +23,24 @@ func main() { sysinit.SysInit() return } - // FIXME: Switch d and D ? (to be more sshd like) - flVersion := flag.Bool("v", false, "Print version information and quit") - flDaemon := flag.Bool("d", false, "Enable daemon mode") - flDebug := flag.Bool("D", false, "Enable debug mode") - flAutoRestart := flag.Bool("r", true, "Restart previously running containers") - bridgeName := flag.String("b", "", "Attach containers to a pre-existing network bridge; use 'none' to disable container networking") - pidfile := flag.String("p", "/var/run/docker.pid", "Path to use for daemon PID file") - flRoot := flag.String("g", "/var/lib/docker", "Path to use as the root of the docker runtime") - flEnableCors := flag.Bool("api-enable-cors", false, "Enable CORS headers in the remote API") - flDns := flag.String("dns", "", "Force docker to use specific DNS servers") - flEnableIptables := flag.Bool("iptables", true, "Disable docker's addition of iptables rules") - flDefaultIp := flag.String("ip", "0.0.0.0", "Default IP address to use when binding container ports") - flInterContainerComm := flag.Bool("icc", true, "Enable inter-container communication") - flGraphDriver := flag.String("s", "", "Force the docker runtime to use a specific storage driver") + var ( + flVersion = flag.Bool("v", false, "Print version information and quit") + flDaemon = flag.Bool("d", false, "Enable daemon mode") + flDebug = flag.Bool("D", false, "Enable debug mode") + flAutoRestart = flag.Bool("r", true, "Restart previously running containers") + bridgeName = flag.String("b", "", "Attach containers to a pre-existing network bridge; use 'none' to disable container networking") + pidfile = flag.String("p", "/var/run/docker.pid", "Path to use for daemon PID file") + flRoot = flag.String("g", "/var/lib/docker", "Path to use as the root of the docker runtime") + flEnableCors = flag.Bool("api-enable-cors", false, "Enable CORS headers in the remote API") + flDns = flag.String("dns", "", "Force docker to use specific DNS servers") + flEnableIptables = flag.Bool("iptables", true, "Disable docker's addition of iptables rules") + flDefaultIp = flag.String("ip", "0.0.0.0", "Default IP address to use when binding container ports") + flInterContainerComm = flag.Bool("icc", true, "Enable inter-container communication") + flGraphDriver = flag.String("s", "", "Force the docker runtime to use a specific storage driver") - flHosts := docker.ListOpts{} + flHosts = docker.ListOpts{} + ) flHosts.Set(fmt.Sprintf("unix://%s", docker.DEFAULTUNIXSOCKET)) flag.Var(&flHosts, "H", "Multiple tcp://host:port or unix://path/to/socket to bind in daemon mode, single connection otherwise")