From 6c70a3d7b53a0d203c2e9887cbf2abd627bb7c11 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 1 Oct 2018 15:45:43 -0700 Subject: [PATCH] remove protocol correctness test This is checked when the protocol is *registered*. There's no reason to test it twice. --- codec.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/codec.go b/codec.go index 1f912f8..9c0c5bc 100644 --- a/codec.go +++ b/codec.go @@ -43,9 +43,6 @@ func stringToBytes(s string) ([]byte, error) { sp = []string{"/" + strings.Join(sp, "/")} } - if p.Transcoder == nil { - return nil, fmt.Errorf("no transcoder for %s protocol", p.Name) - } a, err := p.Transcoder.StringToBytes(sp[0]) if err != nil { return nil, fmt.Errorf("failed to parse %s: %s %s", p.Name, sp[0], err)