1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Format main()

This commit is contained in:
Guillaume J. Charmes 2013-11-26 17:47:58 +00:00
parent 1ba11384bf
commit 1beb5005d1

View file

@ -23,23 +23,24 @@ func main() {
sysinit.SysInit() sysinit.SysInit()
return 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") var (
flDefaultIp := flag.String("ip", "0.0.0.0", "Default IP address to use when binding container ports") flVersion = flag.Bool("v", false, "Print version information and quit")
flInterContainerComm := flag.Bool("icc", true, "Enable inter-container communication") flDaemon = flag.Bool("d", false, "Enable daemon mode")
flGraphDriver := flag.String("s", "", "Force the docker runtime to use a specific storage driver") 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)) 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") flag.Var(&flHosts, "H", "Multiple tcp://host:port or unix://path/to/socket to bind in daemon mode, single connection otherwise")