/*
netstring -- netstring format serialization library
-Copyright (C) 2015-2020 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2015-2022 Sergey Matveev <stargrave@stargrave.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
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")
}