mirror of https://github.com/docker/cli.git
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:
parent
c6919a6e79
commit
eb35552fb3
|
@ -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]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue