mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
support []byte (more efficient) as well as string in the interfaces.
change the names; Match is for []byte and MatchString is for string, etc. R=rsc DELTA=195 (155 added, 0 deleted, 40 changed) OCL=32800 CL=32800
This commit is contained in:
parent
5a4d431dd1
commit
3355cadf3f
7 changed files with 189 additions and 34 deletions
|
|
@ -64,7 +64,7 @@ func TestDialError(t *testing.T) {
|
|||
continue;
|
||||
}
|
||||
s := e.String();
|
||||
match, err := regexp.Match(tt.Pattern, s);
|
||||
match, err := regexp.MatchString(tt.Pattern, s);
|
||||
if !match {
|
||||
t.Errorf("#%d: %q, want match for %#q", i, s, tt.Pattern);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue