Merge pull request #5916 from rhatdan/crash

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

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() {