Skip to content

Commit 0ce971d

Browse files
committed
Add new formatting regex
1 parent 101ea1a commit 0ce971d

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎rpc/responses_test.go‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ import (
1313
)
1414

1515
const (
16-
reHash = `"0x[0-9a-f]{64}"` // 32 bytes
17-
reHashOpt = `"(0x[0-9a-f]{64})"|null` // 32 bytes or null
18-
reAddress = `"0x[0-9a-f]{40}"` // 20 bytes
19-
reAddressOpt = `"0x[0-9a-f]{40}"|null` // 20 bytes or null
20-
reNum = `"0x([1-9a-f][0-9a-f]{1,15})|0"` // must not have left-padded zeros
21-
reData = `"0x[0-9a-f]*"` // can be "empty"
16+
reHash = `"0x[0-9a-f]{64}"` // 32 bytes
17+
reHashOpt = `"(0x[0-9a-f]{64})"|null` // 32 bytes or null
18+
reAddress = `"0x[0-9a-f]{40}"` // 20 bytes
19+
reAddressOpt = `"0x[0-9a-f]{40}"|null` // 20 bytes or null
20+
reNum = `"0x([1-9a-f][0-9a-f]{0,15})|0"` // must not have left-padded zeros
21+
reNumOpt = `"0x([1-9a-f][0-9a-f]{0,15})|0"|null` // must not have left-padded zeros or null
22+
reData = `"0x[0-9a-f]*"` // can be "empty"
2223
)
2324

2425
func TestNewBlockRes(t *testing.T) {

0 commit comments

Comments
 (0)