X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=r.go;h=0637ec692af823aeaba9abf7ffe462a041b00677;hb=fff06d86fd4a1302ca2e71acd1b79fd9d7bb56bb;hp=ca1925908d09e22a1c6b33fe487da9880c06216b;hpb=4a2baae4738ddc9554317c169eaf783600468f7d;p=netstring.git diff --git a/r.go b/r.go index ca19259..0637ec6 100644 --- a/r.go +++ b/r.go @@ -48,7 +48,7 @@ func (r *Reader) Next() (uint64, error) { if len(p) == 0 { return 0, io.EOF } - idx := bytes.Index(p, []byte{':'}) + idx := bytes.IndexByte(p, ':') if idx == -1 { return 0, errors.New("no length separator found") }