Commit e2f4e4e8 authored by Marten Seemann's avatar Marten Seemann

remove unused bytesSplit function

parent d7d65e55
......@@ -176,29 +176,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 := 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
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment