Not sure I would call it "easy" but I was able to reproduce the problem
and then get it to work with this, at least in my testcase:
f := func(a ...string) error {
switch t :=
mv.CallSlice([]reflect.Value{reflect.ValueOf(a)})[0].Interface().(type) {
case error:
return t
default:
return nil
}
}
On 02/06/2015 05:05 PM, Ian Lance Taylor wrote:
On Fri, Feb 6, 2015 at 12:36 PM, Lynn A. Boger
<labo...@linux.vnet.ibm.com> wrote:
I was told by the testers that this patch did not work. The error message
was:
panic: interface conversion: interface is nil, not error
goroutine 1 [running]:
client.$nested1
/home/ubuntu/docker.mainline/src/github.com/docker/docker/api/
client/cli.go:66
github_com_docker_docker_api_client.Cmd.pN45_github_com_docker_docker_api_client.DockerCli
/home/ubuntu/docker.mainline/src/github.com/docker/docker/api/
client/cli.go:84
main.main
/home/ubuntu/docker/docker/docker.go:126
That's easy to fix....
Ian