Skip to content

Commit

Permalink
Update the match package
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tidwall committed Dec 23, 2020
1 parent f0ee9eb commit 9f58baa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion gjson_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand All @@ -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 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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=

0 comments on commit 9f58baa

Please sign in to comment.