golang/go – affected/package: regexp
Table of Contents
What version of Go are you using (go version
)?
go1.17.6
Does this issue reproduce with the latest release?
YES
What operating system and processor architecture are you using (go env
)?
go env
Output
plan9/amd64
What did you do?
go doc regexp Match
What did you expect to see?
package regexp // import “regexp”
func (re *Regexp) Match(b []byte) bool Match reports whether the byte slice b contains any match of the regular expression re. func Match(pattern string, b []byte) (matched bool, err error) Match reports whether the byte slice b contains any match of the regular expression pattern. More complicated queries need to use Compile and the full Regexp interface.
What did you see instead?
package regexp // import “regexp”
func Match(pattern string, b []byte) (matched bool, err error) Match reports whether the byte slice b contains any match of the regular expression pattern. More complicated queries need to use Compile and the full Regexp interface.
Note that
hebe% go doc bufio ReadString package bufio // import “bufio”
func (b *Reader) ReadString(delim byte) (string, error) ReadString reads until the first occurrence of delim in the input, returning a string containing the data up to and including the delimiter. If ReadString encounters an error before finding a delimiter, it returns the data read before the error and the error itself (often io.EOF). ReadString returns err != nil if and only if the returned data does not end in delim. For simple uses, a Scanner may be more convenient.
hebe%
Read more here: Source link