From 555afdb8a5e577fbcb6f2baf6697eeaebf2f6fc4 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Tue, 12 Jun 2018 13:53:39 -0700 Subject: [PATCH] improve error message in libp2p reflection-based transport option --- config/reflection_magic.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/reflection_magic.go b/config/reflection_magic.go index c23658e..d66a26e 100644 --- a/config/reflection_magic.go +++ b/config/reflection_magic.go @@ -23,7 +23,7 @@ func checkReturnType(fnType, tptType reflect.Type) error { fallthrough case 1: if !fnType.Out(0).Implements(tptType) { - return fmt.Errorf("expected first return value from transport constructor to be a transport") + return fmt.Errorf("transport constructor returns %s which doesn't implement %s", fnType.Out(0), tptType) } default: return fmt.Errorf("expected transport constructor to return a transport and, optionally, an error") -- GitLab