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 <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff 2016-04-29 11:16:34 -04:00
parent c6919a6e79
commit eb35552fb3
1 changed files with 7 additions and 0 deletions

View File

@ -9,3 +9,10 @@ type DaemonProxy struct{}
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]
}