diff --git a/codec.go b/codec.go index 2e8c9e5..feaecbf 100644 --- a/codec.go +++ b/codec.go @@ -171,29 +171,3 @@ func sizeForAddr(p Protocol, b []byte) (skip, size int, err error) { return n, size, nil } } - -func bytesSplit(b []byte) ([][]byte, error) { - var ret [][]byte - for len(b) > 0 { - code, n, err := multiaddr.ReadVarintCode(b) - if err != nil { - return nil, err - } - - p := ProtocolWithCode(code) - if p.Code == 0 { - return nil, fmt.Errorf("no protocol with code %d", b[0]) - } - - n2, size, err := sizeForAddr(p, b[n:]) - if err != nil { - return nil, err - } - - length := n + n2 + size - ret = append(ret, b[:length]) - b = b[length:] - } - - return ret, nil -} diff --git a/multiprotocol_test.go b/multiprotocol_test.go index 90b758a..9f9e06c 100644 --- a/multiprotocol_test.go +++ b/multiprotocol_test.go @@ -9,7 +9,7 @@ import ( ) func TestMain(m *testing.M) { - multiprotocol.Init("testdata/multiprotocol.csv") + _ = multiprotocol.Init("testdata/multiprotocol.csv") os.Exit(m.Run()) }