Commit b8b8d51
committed
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.1 parent 352d243 commit b8b8d51
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1615 | 1615 | | |
1616 | 1616 | | |
1617 | 1617 | | |
1618 | | - | |
1619 | 1618 | | |
1620 | 1619 | | |
1621 | 1620 | | |
1622 | 1621 | | |
1623 | 1622 | | |
1624 | 1623 | | |
1625 | 1624 | | |
1626 | | - | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
| 1631 | + | |
| 1632 | + | |
1627 | 1633 | | |
1628 | 1634 | | |
1629 | 1635 | | |
| |||
0 commit comments