mirror of
https://github.com/golang/go
synced 2024-09-30 04:24:29 -06:00
regexp: doc fix
This must have been from when "error" was a good variable name for an "os.Error". But we use "err" these days. R=golang-dev, dsymonds, r CC=golang-dev https://golang.org/cl/9132045
This commit is contained in:
parent
a941491b4e
commit
7cc0581f86
@ -397,7 +397,7 @@ func (re *Regexp) Match(b []byte) bool {
|
|||||||
// MatchReader checks whether a textual regular expression matches the text
|
// MatchReader checks whether a textual regular expression matches the text
|
||||||
// read by the RuneReader. More complicated queries need to use Compile and
|
// read by the RuneReader. More complicated queries need to use Compile and
|
||||||
// the full Regexp interface.
|
// the full Regexp interface.
|
||||||
func MatchReader(pattern string, r io.RuneReader) (matched bool, error error) {
|
func MatchReader(pattern string, r io.RuneReader) (matched bool, err error) {
|
||||||
re, err := Compile(pattern)
|
re, err := Compile(pattern)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
@ -408,7 +408,7 @@ func MatchReader(pattern string, r io.RuneReader) (matched bool, error error) {
|
|||||||
// MatchString checks whether a textual regular expression
|
// MatchString checks whether a textual regular expression
|
||||||
// matches a string. More complicated queries need
|
// matches a string. More complicated queries need
|
||||||
// to use Compile and the full Regexp interface.
|
// to use Compile and the full Regexp interface.
|
||||||
func MatchString(pattern string, s string) (matched bool, error error) {
|
func MatchString(pattern string, s string) (matched bool, err error) {
|
||||||
re, err := Compile(pattern)
|
re, err := Compile(pattern)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
@ -419,7 +419,7 @@ func MatchString(pattern string, s string) (matched bool, error error) {
|
|||||||
// Match checks whether a textual regular expression
|
// Match checks whether a textual regular expression
|
||||||
// matches a byte slice. More complicated queries need
|
// matches a byte slice. More complicated queries need
|
||||||
// to use Compile and the full Regexp interface.
|
// to use Compile and the full Regexp interface.
|
||||||
func Match(pattern string, b []byte) (matched bool, error error) {
|
func Match(pattern string, b []byte) (matched bool, err error) {
|
||||||
re, err := Compile(pattern)
|
re, err := Compile(pattern)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
|
Loading…
Reference in New Issue
Block a user