Merge pull request #5916 from rhatdan/crash

docker '' causes a golang crash.
This commit is contained in:
Michael Crosby 2014-05-20 13:42:48 -07:00
commit f915988a5d

View file

@ -23,6 +23,9 @@ var funcMap = template.FuncMap{
}
func (cli *DockerCli) getMethod(name string) (func(...string) error, bool) {
if len(name) == 0 {
return nil, false
}
methodName := "Cmd" + strings.ToUpper(name[:1]) + strings.ToLower(name[1:])
method := reflect.ValueOf(cli).MethodByName(methodName)
if !method.IsValid() {