Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
assert: handle []byte array properly
The regexp package works more efficiently on bytes; if you have bytes, it is easier to pass these directly to assert.Regexp than to convert them to a string first. In addition, FindIndex/FindStringIndex are unnecessary here because we immediately throw away the result - let's just call Match() instead.
- Loading branch information
1 parent
a61e9e5
commit a9e6121
Showing
2 changed files
with
13 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters