package main

const daemonBinary = "dockerd"

// DaemonProxy acts as a cli.Handler to proxy calls to the daemon binary
type DaemonProxy struct{}

// NewDaemonProxy returns a new handler
func NewDaemonProxy() DaemonProxy {
	return DaemonProxy{}
}

// Command returns a cli command handler if one exists
func (p DaemonProxy) Command(name string) func(...string) error {
	return map[string]func(...string) error{
		"daemon": p.CmdDaemon,
	}[name]
}

package main

const daemonBinary = "dockerd"

// DaemonProxy acts as a cli.Handler to proxy calls to the daemon binary
type DaemonProxy struct{}

// NewDaemonProxy returns a new handler
func NewDaemonProxy() DaemonProxy {
	return DaemonProxy{}
}

--- 
+++ 
@@ -9,3 +9,10 @@
 func NewDaemonProxy() DaemonProxy {
 	return DaemonProxy{}
 }
+
+// Command returns a cli command handler if one exists
+func (p DaemonProxy) Command(name string) func(...string) error {
+	return map[string]func(...string) error{
+		"daemon": p.CmdDaemon,
+	}[name]
+}
Remove reflection on CLI init

before:
```
$ time docker --help
real  0m0.177s
user  0m0.000s
sys 0m0.040s
```

after:
```
$ time docker --help
real  0m0.010s
user  0m0.000s
sys 0m0.000s
```

Signed-off-by: Brian Goff <dc73d0991b982a8303e713ef531a313af77e242a@gmail.com>
