forked from mirror/gjson
Update the match package
This commit updates the match package to v1.0.3, which includes a fix to an issue where a pattern with lots of repetitive stars will increasingly slow down a Match operation. Fixes #195
This commit is contained in:
parent
f0ee9ebde4
commit
9f58baa7a6
|
@ -2180,7 +2180,6 @@ func TestJoin152(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestIssue192(t *testing.T) {
|
||||
|
||||
assert(t, squash(`"000"hello`) == `"000"`)
|
||||
assert(t, squash(`"000"`) == `"000"`)
|
||||
assert(t, squash(`"000`) == `"000`)
|
||||
|
@ -2194,5 +2193,10 @@ func TestIssue192(t *testing.T) {
|
|||
|
||||
testJSON := `0.#[[{}]].@valid:"000`
|
||||
Get(testJSON, testJSON)
|
||||
|
||||
}
|
||||
|
||||
func TestIssue195(t *testing.T) {
|
||||
testJSON := `\************************************` +
|
||||
`**********{**",**,,**,**,**,**,"",**,**,**,**,**,**,**,**,**,**]`
|
||||
Get(testJSON, testJSON)
|
||||
}
|
||||
|
|
2
go.mod
2
go.mod
|
@ -3,6 +3,6 @@ module github.com/tidwall/gjson
|
|||
go 1.12
|
||||
|
||||
require (
|
||||
github.com/tidwall/match v1.0.1
|
||||
github.com/tidwall/match v1.0.3
|
||||
github.com/tidwall/pretty v1.0.2
|
||||
)
|
||||
|
|
2
go.sum
2
go.sum
|
@ -1,4 +1,6 @@
|
|||
github.com/tidwall/match v1.0.1 h1:PnKP62LPNxHKTwvHHZZzdOAOCtsJTjo6dZLCwpKm5xc=
|
||||
github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E=
|
||||
github.com/tidwall/match v1.0.3 h1:FQUVvBImDutD8wJLN6c5eMzWtjgONK9MwIBCOrUJKeE=
|
||||
github.com/tidwall/match v1.0.3/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM=
|
||||
github.com/tidwall/pretty v1.0.2 h1:Z7S3cePv9Jwm1KwS0513MRaoUe3S01WPbLNV40pwWZU=
|
||||
github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
|
||||
|
|
Loading…
Reference in New Issue