Browse Source

upgrade buntdb and dependencies

tags/v2.5.0-rc1
Shivaram Lingamneni 3 years ago
parent
commit
008416e4dd

+ 1
- 1
go.mod View File

@@ -16,7 +16,7 @@ require (
16 16
 	github.com/oragono/confusables v0.0.0-20190624102032-fe1cf31a24b0
17 17
 	github.com/oragono/go-ident v0.0.0-20200511222032-830550b1d775
18 18
 	github.com/stretchr/testify v1.4.0 // indirect
19
-	github.com/tidwall/buntdb v1.1.2
19
+	github.com/tidwall/buntdb v1.1.4
20 20
 	github.com/toorop/go-dkim v0.0.0-20200526084421-76378ae5207e
21 21
 	golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a
22 22
 	golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f // indirect

+ 10
- 0
go.sum View File

@@ -42,18 +42,28 @@ github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJy
42 42
 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
43 43
 github.com/tidwall/btree v0.0.0-20191029221954-400434d76274 h1:G6Z6HvJuPjG6XfNGi/feOATzeJrfgTNJY+rGrHbA04E=
44 44
 github.com/tidwall/btree v0.0.0-20191029221954-400434d76274/go.mod h1:huei1BkDWJ3/sLXmO+bsCNELL+Bp2Kks9OLyQFkzvA8=
45
+github.com/tidwall/btree v0.2.2 h1:VVo0JW/tdidNdQzNsDR4wMbL3heaxA1DGleyzQ3/niY=
46
+github.com/tidwall/btree v0.2.2/go.mod h1:huei1BkDWJ3/sLXmO+bsCNELL+Bp2Kks9OLyQFkzvA8=
45 47
 github.com/tidwall/buntdb v1.1.2 h1:noCrqQXL9EKMtcdwJcmuVKSEjqu1ua99RHHgbLTEHRo=
46 48
 github.com/tidwall/buntdb v1.1.2/go.mod h1:xAzi36Hir4FarpSHyfuZ6JzPJdjRZ8QlLZSntE2mqlI=
49
+github.com/tidwall/buntdb v1.1.4 h1:W7y9+2dM3GOswU0t3pz6+BcwZXjj/tVOhPcO6EHufME=
50
+github.com/tidwall/buntdb v1.1.4/go.mod h1:06+/n7EFf6uUaIG5r9xZcExYN3H0Lnc+g/Kqx0fZFkI=
47 51
 github.com/tidwall/gjson v1.3.4 h1:On5waDnyKKk3SWE4EthbjjirAWXp43xx5cKCUZY1eZw=
48 52
 github.com/tidwall/gjson v1.3.4/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls=
53
+github.com/tidwall/gjson v1.6.1 h1:LRbvNuNuvAiISWg6gxLEFuCe72UKy5hDqhxW/8183ws=
54
+github.com/tidwall/gjson v1.6.1/go.mod h1:BaHyNc5bjzYkPqgLq7mdVzeiRtULKULXLgZFKsxEHI0=
49 55
 github.com/tidwall/grect v0.0.0-20161006141115-ba9a043346eb h1:5NSYaAdrnblKByzd7XByQEJVT8+9v0W/tIY0Oo4OwrE=
50 56
 github.com/tidwall/grect v0.0.0-20161006141115-ba9a043346eb/go.mod h1:lKYYLFIr9OIgdgrtgkZ9zgRxRdvPYsExnYBsEAd8W5M=
51 57
 github.com/tidwall/match v1.0.1 h1:PnKP62LPNxHKTwvHHZZzdOAOCtsJTjo6dZLCwpKm5xc=
52 58
 github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E=
53 59
 github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
54 60
 github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
61
+github.com/tidwall/pretty v1.0.2 h1:Z7S3cePv9Jwm1KwS0513MRaoUe3S01WPbLNV40pwWZU=
62
+github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
55 63
 github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e h1:+NL1GDIUOKxVfbp2KoJQD9cTQ6dyP2co9q4yzmT9FZo=
56 64
 github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e/go.mod h1:/h+UnNGt0IhNNJLkGikcdcJqm66zGD/uJGMRxK/9+Ao=
65
+github.com/tidwall/rtree v0.0.0-20201027154624-32188eeb08a8 h1:BsKSRhu0TDB6Snq8SutN9KQHc6vqHEXJTcAFwyGNius=
66
+github.com/tidwall/rtree v0.0.0-20201027154624-32188eeb08a8/go.mod h1:/h+UnNGt0IhNNJLkGikcdcJqm66zGD/uJGMRxK/9+Ao=
57 67
 github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 h1:Otn9S136ELckZ3KKDyCkxapfufrqDqwmGjcHfAyXRrE=
58 68
 github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563/go.mod h1:mLqSmt7Dv/CNneF2wfcChfN1rvapyQr01LGKnKex0DQ=
59 69
 github.com/toorop/go-dkim v0.0.0-20200526084421-76378ae5207e h1:uZTp+hhFm+PCH0t0Px5oE+QYlVTwVJ+XKNQr7ct4Q7w=

+ 18
- 202
vendor/github.com/tidwall/btree/LICENSE View File

@@ -1,202 +1,18 @@
1
-
2
-                                 Apache License
3
-                           Version 2.0, January 2004
4
-                        http://www.apache.org/licenses/
5
-
6
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
-
8
-   1. Definitions.
9
-
10
-      "License" shall mean the terms and conditions for use, reproduction,
11
-      and distribution as defined by Sections 1 through 9 of this document.
12
-
13
-      "Licensor" shall mean the copyright owner or entity authorized by
14
-      the copyright owner that is granting the License.
15
-
16
-      "Legal Entity" shall mean the union of the acting entity and all
17
-      other entities that control, are controlled by, or are under common
18
-      control with that entity. For the purposes of this definition,
19
-      "control" means (i) the power, direct or indirect, to cause the
20
-      direction or management of such entity, whether by contract or
21
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
-      outstanding shares, or (iii) beneficial ownership of such entity.
23
-
24
-      "You" (or "Your") shall mean an individual or Legal Entity
25
-      exercising permissions granted by this License.
26
-
27
-      "Source" form shall mean the preferred form for making modifications,
28
-      including but not limited to software source code, documentation
29
-      source, and configuration files.
30
-
31
-      "Object" form shall mean any form resulting from mechanical
32
-      transformation or translation of a Source form, including but
33
-      not limited to compiled object code, generated documentation,
34
-      and conversions to other media types.
35
-
36
-      "Work" shall mean the work of authorship, whether in Source or
37
-      Object form, made available under the License, as indicated by a
38
-      copyright notice that is included in or attached to the work
39
-      (an example is provided in the Appendix below).
40
-
41
-      "Derivative Works" shall mean any work, whether in Source or Object
42
-      form, that is based on (or derived from) the Work and for which the
43
-      editorial revisions, annotations, elaborations, or other modifications
44
-      represent, as a whole, an original work of authorship. For the purposes
45
-      of this License, Derivative Works shall not include works that remain
46
-      separable from, or merely link (or bind by name) to the interfaces of,
47
-      the Work and Derivative Works thereof.
48
-
49
-      "Contribution" shall mean any work of authorship, including
50
-      the original version of the Work and any modifications or additions
51
-      to that Work or Derivative Works thereof, that is intentionally
52
-      submitted to Licensor for inclusion in the Work by the copyright owner
53
-      or by an individual or Legal Entity authorized to submit on behalf of
54
-      the copyright owner. For the purposes of this definition, "submitted"
55
-      means any form of electronic, verbal, or written communication sent
56
-      to the Licensor or its representatives, including but not limited to
57
-      communication on electronic mailing lists, source code control systems,
58
-      and issue tracking systems that are managed by, or on behalf of, the
59
-      Licensor for the purpose of discussing and improving the Work, but
60
-      excluding communication that is conspicuously marked or otherwise
61
-      designated in writing by the copyright owner as "Not a Contribution."
62
-
63
-      "Contributor" shall mean Licensor and any individual or Legal Entity
64
-      on behalf of whom a Contribution has been received by Licensor and
65
-      subsequently incorporated within the Work.
66
-
67
-   2. Grant of Copyright License. Subject to the terms and conditions of
68
-      this License, each Contributor hereby grants to You a perpetual,
69
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
-      copyright license to reproduce, prepare Derivative Works of,
71
-      publicly display, publicly perform, sublicense, and distribute the
72
-      Work and such Derivative Works in Source or Object form.
73
-
74
-   3. Grant of Patent License. Subject to the terms and conditions of
75
-      this License, each Contributor hereby grants to You a perpetual,
76
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
-      (except as stated in this section) patent license to make, have made,
78
-      use, offer to sell, sell, import, and otherwise transfer the Work,
79
-      where such license applies only to those patent claims licensable
80
-      by such Contributor that are necessarily infringed by their
81
-      Contribution(s) alone or by combination of their Contribution(s)
82
-      with the Work to which such Contribution(s) was submitted. If You
83
-      institute patent litigation against any entity (including a
84
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
85
-      or a Contribution incorporated within the Work constitutes direct
86
-      or contributory patent infringement, then any patent licenses
87
-      granted to You under this License for that Work shall terminate
88
-      as of the date such litigation is filed.
89
-
90
-   4. Redistribution. You may reproduce and distribute copies of the
91
-      Work or Derivative Works thereof in any medium, with or without
92
-      modifications, and in Source or Object form, provided that You
93
-      meet the following conditions:
94
-
95
-      (a) You must give any other recipients of the Work or
96
-          Derivative Works a copy of this License; and
97
-
98
-      (b) You must cause any modified files to carry prominent notices
99
-          stating that You changed the files; and
100
-
101
-      (c) You must retain, in the Source form of any Derivative Works
102
-          that You distribute, all copyright, patent, trademark, and
103
-          attribution notices from the Source form of the Work,
104
-          excluding those notices that do not pertain to any part of
105
-          the Derivative Works; and
106
-
107
-      (d) If the Work includes a "NOTICE" text file as part of its
108
-          distribution, then any Derivative Works that You distribute must
109
-          include a readable copy of the attribution notices contained
110
-          within such NOTICE file, excluding those notices that do not
111
-          pertain to any part of the Derivative Works, in at least one
112
-          of the following places: within a NOTICE text file distributed
113
-          as part of the Derivative Works; within the Source form or
114
-          documentation, if provided along with the Derivative Works; or,
115
-          within a display generated by the Derivative Works, if and
116
-          wherever such third-party notices normally appear. The contents
117
-          of the NOTICE file are for informational purposes only and
118
-          do not modify the License. You may add Your own attribution
119
-          notices within Derivative Works that You distribute, alongside
120
-          or as an addendum to the NOTICE text from the Work, provided
121
-          that such additional attribution notices cannot be construed
122
-          as modifying the License.
123
-
124
-      You may add Your own copyright statement to Your modifications and
125
-      may provide additional or different license terms and conditions
126
-      for use, reproduction, or distribution of Your modifications, or
127
-      for any such Derivative Works as a whole, provided Your use,
128
-      reproduction, and distribution of the Work otherwise complies with
129
-      the conditions stated in this License.
130
-
131
-   5. Submission of Contributions. Unless You explicitly state otherwise,
132
-      any Contribution intentionally submitted for inclusion in the Work
133
-      by You to the Licensor shall be under the terms and conditions of
134
-      this License, without any additional terms or conditions.
135
-      Notwithstanding the above, nothing herein shall supersede or modify
136
-      the terms of any separate license agreement you may have executed
137
-      with Licensor regarding such Contributions.
138
-
139
-   6. Trademarks. This License does not grant permission to use the trade
140
-      names, trademarks, service marks, or product names of the Licensor,
141
-      except as required for reasonable and customary use in describing the
142
-      origin of the Work and reproducing the content of the NOTICE file.
143
-
144
-   7. Disclaimer of Warranty. Unless required by applicable law or
145
-      agreed to in writing, Licensor provides the Work (and each
146
-      Contributor provides its Contributions) on an "AS IS" BASIS,
147
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
-      implied, including, without limitation, any warranties or conditions
149
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
-      PARTICULAR PURPOSE. You are solely responsible for determining the
151
-      appropriateness of using or redistributing the Work and assume any
152
-      risks associated with Your exercise of permissions under this License.
153
-
154
-   8. Limitation of Liability. In no event and under no legal theory,
155
-      whether in tort (including negligence), contract, or otherwise,
156
-      unless required by applicable law (such as deliberate and grossly
157
-      negligent acts) or agreed to in writing, shall any Contributor be
158
-      liable to You for damages, including any direct, indirect, special,
159
-      incidental, or consequential damages of any character arising as a
160
-      result of this License or out of the use or inability to use the
161
-      Work (including but not limited to damages for loss of goodwill,
162
-      work stoppage, computer failure or malfunction, or any and all
163
-      other commercial damages or losses), even if such Contributor
164
-      has been advised of the possibility of such damages.
165
-
166
-   9. Accepting Warranty or Additional Liability. While redistributing
167
-      the Work or Derivative Works thereof, You may choose to offer,
168
-      and charge a fee for, acceptance of support, warranty, indemnity,
169
-      or other liability obligations and/or rights consistent with this
170
-      License. However, in accepting such obligations, You may act only
171
-      on Your own behalf and on Your sole responsibility, not on behalf
172
-      of any other Contributor, and only if You agree to indemnify,
173
-      defend, and hold each Contributor harmless for any liability
174
-      incurred by, or claims asserted against, such Contributor by reason
175
-      of your accepting any such warranty or additional liability.
176
-
177
-   END OF TERMS AND CONDITIONS
178
-
179
-   APPENDIX: How to apply the Apache License to your work.
180
-
181
-      To apply the Apache License to your work, attach the following
182
-      boilerplate notice, with the fields enclosed by brackets "[]"
183
-      replaced with your own identifying information. (Don't include
184
-      the brackets!)  The text should be enclosed in the appropriate
185
-      comment syntax for the file format. We also recommend that a
186
-      file or class name and description of purpose be included on the
187
-      same "printed page" as the copyright notice for easier
188
-      identification within third-party archives.
189
-
190
-   Copyright [yyyy] [name of copyright owner]
191
-
192
-   Licensed under the Apache License, Version 2.0 (the "License");
193
-   you may not use this file except in compliance with the License.
194
-   You may obtain a copy of the License at
195
-
196
-       http://www.apache.org/licenses/LICENSE-2.0
197
-
198
-   Unless required by applicable law or agreed to in writing, software
199
-   distributed under the License is distributed on an "AS IS" BASIS,
200
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
-   See the License for the specific language governing permissions and
202
-   limitations under the License.
1
+Copyright (c) 2020 Josh Baker
2
+
3
+Permission is hereby granted, free of charge, to any person obtaining a copy of
4
+this software and associated documentation files (the "Software"), to deal in
5
+the Software without restriction, including without limitation the rights to
6
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
7
+the Software, and to permit persons to whom the Software is furnished to do so,
8
+subject to the following conditions:
9
+
10
+The above copyright notice and this permission notice shall be included in all
11
+copies or substantial portions of the Software.
12
+
13
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
15
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
16
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 1
- 103
vendor/github.com/tidwall/btree/README.md View File

@@ -1,107 +1,5 @@
1
-BTree implementation for Go
2
-===========================
1
+# B-tree for Go
3 2
 
4 3
 ![Travis CI Build Status](https://api.travis-ci.org/tidwall/btree.svg?branch=master)
5 4
 [![GoDoc](https://godoc.org/github.com/tidwall/btree?status.svg)](https://godoc.org/github.com/tidwall/btree)
6 5
 
7
-This package provides an in-memory B-Tree implementation for Go, useful as
8
-an ordered, mutable data structure.
9
-
10
-This is a fork of the wonderful [google/btree](https://github.com/google/btree) package. It's has all the same great features and adds a few more.
11
-
12
-- Descend* functions for iterating backwards.
13
-- Iteration performance boost.
14
-- User defined context.
15
-
16
-User defined context
17
---------------------
18
-This is a great new feature that allows for entering the same item into multiple B-trees, and each B-tree have a different ordering formula.
19
-
20
-For example:
21
-
22
-```go
23
-package main
24
-
25
-import (
26
-	"fmt"
27
-
28
-	"github.com/tidwall/btree"
29
-)
30
-
31
-type Item struct {
32
-	Key, Val string
33
-}
34
-
35
-func (i1 *Item) Less(item btree.Item, ctx interface{}) bool {
36
-	i2 := item.(*Item)
37
-	switch tag := ctx.(type) {
38
-	case string:
39
-		if tag == "vals" {
40
-			if i1.Val < i2.Val {
41
-				return true
42
-			} else if i1.Val > i2.Val {
43
-				return false
44
-			}
45
-			// Both vals are equal so we should fall though
46
-			// and let the key comparison take over.
47
-		}
48
-	}
49
-	return i1.Key < i2.Key
50
-}
51
-
52
-func main() {
53
-
54
-	// Create a tree for keys and a tree for values.
55
-	// The "keys" tree will be sorted on the Keys field.
56
-	// The "values" tree will be sorted on the Values field.
57
-	keys := btree.New(16, "keys")
58
-	vals := btree.New(16, "vals")
59
-
60
-	// Create some items.
61
-	users := []*Item{
62
-		&Item{Key: "user:1", Val: "Jane"},
63
-		&Item{Key: "user:2", Val: "Andy"},
64
-		&Item{Key: "user:3", Val: "Steve"},
65
-		&Item{Key: "user:4", Val: "Andrea"},
66
-		&Item{Key: "user:5", Val: "Janet"},
67
-		&Item{Key: "user:6", Val: "Andy"},
68
-	}
69
-
70
-	// Insert each user into both trees
71
-	for _, user := range users {
72
-		keys.ReplaceOrInsert(user)
73
-		vals.ReplaceOrInsert(user)
74
-	}
75
-
76
-	// Iterate over each user in the key tree
77
-	keys.Ascend(func(item btree.Item) bool {
78
-		kvi := item.(*Item)
79
-		fmt.Printf("%s %s\n", kvi.Key, kvi.Val)
80
-		return true
81
-	})
82
-
83
-	fmt.Printf("\n")
84
-	// Iterate over each user in the val tree
85
-	vals.Ascend(func(item btree.Item) bool {
86
-		kvi := item.(*Item)
87
-		fmt.Printf("%s %s\n", kvi.Key, kvi.Val)
88
-		return true
89
-	})
90
-}
91
-
92
-// Should see the results
93
-/*
94
-user:1 Jane
95
-user:2 Andy
96
-user:3 Steve
97
-user:4 Andrea
98
-user:5 Janet
99
-user:6 Andy
100
-
101
-user:4 Andrea
102
-user:2 Andy
103
-user:6 Andy
104
-user:1 Jane
105
-user:3 Steve
106
-*/
107
-```

+ 479
- 852
vendor/github.com/tidwall/btree/btree.go
File diff suppressed because it is too large
View File


+ 3
- 0
vendor/github.com/tidwall/buntdb/.travis.yml View File

@@ -1 +1,4 @@
1 1
 language: go
2
+
3
+go:
4
+    - 1.15.x

+ 1
- 1
vendor/github.com/tidwall/buntdb/README.md View File

@@ -576,7 +576,7 @@ var config buntdb.Config
576 576
 if err := db.ReadConfig(&config); err != nil{
577 577
 	log.Fatal(err)
578 578
 }
579
-if err := db.WriteConfig(config); err != nil{
579
+if err := db.SetConfig(config); err != nil{
580 580
 	log.Fatal(err)
581 581
 }
582 582
 ```

+ 113
- 42
vendor/github.com/tidwall/buntdb/buntdb.go View File

@@ -1,7 +1,7 @@
1 1
 // Package buntdb implements a low-level in-memory key/value store in pure Go.
2 2
 // It persists to disk, is ACID compliant, and uses locking for multiple
3
-// readers and a single writer. Bunt is ideal for projects that need
4
-// a dependable database, and favor speed over data size.
3
+// readers and a single writer. Bunt is ideal for projects that need a
4
+// dependable database, and favor speed over data size.
5 5
 package buntdb
6 6
 
7 7
 import (
@@ -122,10 +122,11 @@ type Config struct {
122 122
 	// has been expired.
123 123
 	OnExpired func(keys []string)
124 124
 
125
-	// OnExpiredSync will be called inside the same transaction that is performing
126
-	// the deletion of expired items. If OnExpired is present then this callback
127
-	// will not be called. If this callback is present, then the deletion of the
128
-	// timeed-out item is the explicit responsibility of this callback.
125
+	// OnExpiredSync will be called inside the same transaction that is
126
+	// performing the deletion of expired items. If OnExpired is present then
127
+	// this callback will not be called. If this callback is present, then the
128
+	// deletion of the timeed-out item is the explicit responsibility of this
129
+	// callback.
129 130
 	OnExpiredSync func(key, value string, tx *Tx) error
130 131
 }
131 132
 
@@ -142,8 +143,8 @@ const btreeDegrees = 64
142 143
 func Open(path string) (*DB, error) {
143 144
 	db := &DB{}
144 145
 	// initialize trees and indexes
145
-	db.keys = btree.New(btreeDegrees, nil)
146
-	db.exps = btree.New(btreeDegrees, &exctx{db})
146
+	db.keys = btree.New(lessCtx(nil))
147
+	db.exps = btree.New(lessCtx(&exctx{db}))
147 148
 	db.idxs = make(map[string]*index)
148 149
 	// initialize default configuration
149 150
 	db.config = Config{
@@ -204,7 +205,7 @@ func (db *DB) Save(wr io.Writer) error {
204 205
 	// use a buffered writer and flush every 4MB
205 206
 	var buf []byte
206 207
 	// iterated through every item in the database and write to the buffer
207
-	db.keys.Ascend(func(item btree.Item) bool {
208
+	btreeAscend(db.keys, func(item interface{}) bool {
208 209
 		dbi := item.(*dbItem)
209 210
 		buf = dbi.writeSetTo(buf)
210 211
 		if len(buf) > 1024*1024*4 {
@@ -285,7 +286,7 @@ func (idx *index) clearCopy() *index {
285 286
 	}
286 287
 	// initialize with empty trees
287 288
 	if nidx.less != nil {
288
-		nidx.btr = btree.New(btreeDegrees, nidx)
289
+		nidx.btr = btree.New(lessCtx(nidx))
289 290
 	}
290 291
 	if nidx.rect != nil {
291 292
 		nidx.rtr = rtree.New(nidx)
@@ -297,20 +298,20 @@ func (idx *index) clearCopy() *index {
297 298
 func (idx *index) rebuild() {
298 299
 	// initialize trees
299 300
 	if idx.less != nil {
300
-		idx.btr = btree.New(btreeDegrees, idx)
301
+		idx.btr = btree.New(lessCtx(idx))
301 302
 	}
302 303
 	if idx.rect != nil {
303 304
 		idx.rtr = rtree.New(idx)
304 305
 	}
305 306
 	// iterate through all keys and fill the index
306
-	idx.db.keys.Ascend(func(item btree.Item) bool {
307
+	btreeAscend(idx.db.keys, func(item interface{}) bool {
307 308
 		dbi := item.(*dbItem)
308 309
 		if !idx.match(dbi.key) {
309
-			// does not match the pattern, conintue
310
+			// does not match the pattern, continue
310 311
 			return true
311 312
 		}
312 313
 		if idx.less != nil {
313
-			idx.btr.ReplaceOrInsert(dbi)
314
+			idx.btr.Set(dbi)
314 315
 		}
315 316
 		if idx.rect != nil {
316 317
 			idx.rtr.Insert(dbi)
@@ -456,7 +457,7 @@ func (db *DB) SetConfig(config Config) error {
456 457
 // will be replaced with the new one, and return the previous item.
457 458
 func (db *DB) insertIntoDatabase(item *dbItem) *dbItem {
458 459
 	var pdbi *dbItem
459
-	prev := db.keys.ReplaceOrInsert(item)
460
+	prev := db.keys.Set(item)
460 461
 	if prev != nil {
461 462
 		// A previous item was removed from the keys tree. Let's
462 463
 		// fully delete this item from all indexes.
@@ -479,7 +480,7 @@ func (db *DB) insertIntoDatabase(item *dbItem) *dbItem {
479 480
 	if item.opts != nil && item.opts.ex {
480 481
 		// The new item has eviction options. Add it to the
481 482
 		// expires tree
482
-		db.exps.ReplaceOrInsert(item)
483
+		db.exps.Set(item)
483 484
 	}
484 485
 	for _, idx := range db.idxs {
485 486
 		if !idx.match(item.key) {
@@ -487,7 +488,7 @@ func (db *DB) insertIntoDatabase(item *dbItem) *dbItem {
487 488
 		}
488 489
 		if idx.btr != nil {
489 490
 			// Add new item to btree index.
490
-			idx.btr.ReplaceOrInsert(item)
491
+			idx.btr.Set(item)
491 492
 		}
492 493
 		if idx.rtr != nil {
493 494
 			// Add new item to rtree index.
@@ -557,9 +558,9 @@ func (db *DB) backgroundManager() {
557 558
 				}
558 559
 			}
559 560
 			// produce a list of expired items that need removing
560
-			db.exps.AscendLessThan(&dbItem{
561
+			btreeAscendLessThan(db.exps, &dbItem{
561 562
 				opts: &dbItemOpts{ex: true, exat: time.Now()},
562
-			}, func(item btree.Item) bool {
563
+			}, func(item interface{}) bool {
563 564
 				expired = append(expired, item.(*dbItem))
564 565
 				return true
565 566
 			})
@@ -674,8 +675,8 @@ func (db *DB) Shrink() error {
674 675
 			}
675 676
 			done = true
676 677
 			var n int
677
-			db.keys.AscendGreaterOrEqual(&dbItem{key: pivot},
678
-				func(item btree.Item) bool {
678
+			btreeAscendGreaterOrEqual(db.keys, &dbItem{key: pivot},
679
+				func(item interface{}) bool {
679 680
 					dbi := item.(*dbItem)
680 681
 					// 1000 items or 64MB buffer
681 682
 					if n > 1000 || len(buf) > 64*1024*1024 {
@@ -849,7 +850,7 @@ func (db *DB) readLoad(rd io.Reader, modTime time.Time) error {
849 850
 		if len(parts) == 0 {
850 851
 			continue
851 852
 		}
852
-		if (parts[0][0] == 's' || parts[0][1] == 'S') &&
853
+		if (parts[0][0] == 's' || parts[0][0] == 'S') &&
853 854
 			(parts[0][1] == 'e' || parts[0][1] == 'E') &&
854 855
 			(parts[0][2] == 't' || parts[0][2] == 'T') {
855 856
 			// SET
@@ -879,7 +880,7 @@ func (db *DB) readLoad(rd io.Reader, modTime time.Time) error {
879 880
 			} else {
880 881
 				db.insertIntoDatabase(&dbItem{key: parts[1], val: parts[2]})
881 882
 			}
882
-		} else if (parts[0][0] == 'd' || parts[0][1] == 'D') &&
883
+		} else if (parts[0][0] == 'd' || parts[0][0] == 'D') &&
883 884
 			(parts[0][1] == 'e' || parts[0][1] == 'E') &&
884 885
 			(parts[0][2] == 'l' || parts[0][2] == 'L') {
885 886
 			// DEL
@@ -887,10 +888,10 @@ func (db *DB) readLoad(rd io.Reader, modTime time.Time) error {
887 888
 				return ErrInvalid
888 889
 			}
889 890
 			db.deleteFromDatabase(&dbItem{key: parts[1]})
890
-		} else if (parts[0][0] == 'f' || parts[0][1] == 'F') &&
891
+		} else if (parts[0][0] == 'f' || parts[0][0] == 'F') &&
891 892
 			strings.ToLower(parts[0]) == "flushdb" {
892
-			db.keys = btree.New(btreeDegrees, nil)
893
-			db.exps = btree.New(btreeDegrees, &exctx{db})
893
+			db.keys = btree.New(lessCtx(nil))
894
+			db.exps = btree.New(lessCtx(&exctx{db}))
894 895
 			db.idxs = make(map[string]*index)
895 896
 		} else {
896 897
 			return ErrInvalid
@@ -1025,8 +1026,8 @@ func (tx *Tx) DeleteAll() error {
1025 1026
 	}
1026 1027
 
1027 1028
 	// now reset the live database trees
1028
-	tx.db.keys = btree.New(btreeDegrees, nil)
1029
-	tx.db.exps = btree.New(btreeDegrees, &exctx{tx.db})
1029
+	tx.db.keys = btree.New(lessCtx(nil))
1030
+	tx.db.exps = btree.New(lessCtx(&exctx{tx.db}))
1030 1031
 	tx.db.idxs = make(map[string]*index)
1031 1032
 
1032 1033
 	// finally re-create the indexes
@@ -1264,8 +1265,7 @@ func (dbi *dbItem) expiresAt() time.Time {
1264 1265
 // to note that the ctx parameter is used to help with determine which
1265 1266
 // formula to use on an item. Each b-tree should use a different ctx when
1266 1267
 // sharing the same item.
1267
-func (dbi *dbItem) Less(item btree.Item, ctx interface{}) bool {
1268
-	dbi2 := item.(*dbItem)
1268
+func (dbi *dbItem) Less(dbi2 *dbItem, ctx interface{}) bool {
1269 1269
 	switch ctx := ctx.(type) {
1270 1270
 	case *exctx:
1271 1271
 		// The expires b-tree formula
@@ -1295,6 +1295,12 @@ func (dbi *dbItem) Less(item btree.Item, ctx interface{}) bool {
1295 1295
 	return dbi.key < dbi2.key
1296 1296
 }
1297 1297
 
1298
+func lessCtx(ctx interface{}) func(a, b interface{}) bool {
1299
+	return func(a, b interface{}) bool {
1300
+		return a.(*dbItem).Less(b.(*dbItem), ctx)
1301
+	}
1302
+}
1303
+
1298 1304
 // Rect converts a string to a rectangle.
1299 1305
 // An invalid rectangle will cause a panic.
1300 1306
 func (dbi *dbItem) Rect(ctx interface{}) (min, max []float64) {
@@ -1498,7 +1504,7 @@ func (tx *Tx) scan(desc, gt, lt bool, index, start, stop string,
1498 1504
 		return ErrTxClosed
1499 1505
 	}
1500 1506
 	// wrap a btree specific iterator around the user-defined iterator.
1501
-	iter := func(item btree.Item) bool {
1507
+	iter := func(item interface{}) bool {
1502 1508
 		dbi := item.(*dbItem)
1503 1509
 		return iterator(dbi.key, dbi.val)
1504 1510
 	}
@@ -1542,26 +1548,26 @@ func (tx *Tx) scan(desc, gt, lt bool, index, start, stop string,
1542 1548
 	if desc {
1543 1549
 		if gt {
1544 1550
 			if lt {
1545
-				tr.DescendRange(itemA, itemB, iter)
1551
+				btreeDescendRange(tr, itemA, itemB, iter)
1546 1552
 			} else {
1547
-				tr.DescendGreaterThan(itemA, iter)
1553
+				btreeDescendGreaterThan(tr, itemA, iter)
1548 1554
 			}
1549 1555
 		} else if lt {
1550
-			tr.DescendLessOrEqual(itemA, iter)
1556
+			btreeDescendLessOrEqual(tr, itemA, iter)
1551 1557
 		} else {
1552
-			tr.Descend(iter)
1558
+			btreeDescend(tr, iter)
1553 1559
 		}
1554 1560
 	} else {
1555 1561
 		if gt {
1556 1562
 			if lt {
1557
-				tr.AscendRange(itemA, itemB, iter)
1563
+				btreeAscendRange(tr, itemA, itemB, iter)
1558 1564
 			} else {
1559
-				tr.AscendGreaterOrEqual(itemA, iter)
1565
+				btreeAscendGreaterOrEqual(tr, itemA, iter)
1560 1566
 			}
1561 1567
 		} else if lt {
1562
-			tr.AscendLessThan(itemA, iter)
1568
+			btreeAscendLessThan(tr, itemA, iter)
1563 1569
 		} else {
1564
-			tr.Ascend(iter)
1570
+			btreeAscend(tr, iter)
1565 1571
 		}
1566 1572
 	}
1567 1573
 	return nil
@@ -2014,7 +2020,8 @@ func (tx *Tx) createIndex(name string, pattern string,
2014 2020
 	if tx.wc.rbkeys == nil {
2015 2021
 		// store the index in the rollback map.
2016 2022
 		if _, ok := tx.wc.rollbackIndexes[name]; !ok {
2017
-			// we use nil to indicate that the index should be removed upon rollback.
2023
+			// we use nil to indicate that the index should be removed upon
2024
+			// rollback.
2018 2025
 			tx.wc.rollbackIndexes[name] = nil
2019 2026
 		}
2020 2027
 	}
@@ -2044,8 +2051,8 @@ func (tx *Tx) DropIndex(name string) error {
2044 2051
 	if tx.wc.rbkeys == nil {
2045 2052
 		// store the index in the rollback map.
2046 2053
 		if _, ok := tx.wc.rollbackIndexes[name]; !ok {
2047
-			// we use a non-nil copy of the index without the data to indicate that the
2048
-			// index should be rebuilt upon rollback.
2054
+			// we use a non-nil copy of the index without the data to indicate
2055
+			// that the index should be rebuilt upon rollback.
2049 2056
 			tx.wc.rollbackIndexes[name] = idx.clearCopy()
2050 2057
 		}
2051 2058
 	}
@@ -2181,3 +2188,67 @@ func IndexJSONCaseSensitive(path string) func(a, b string) bool {
2181 2188
 func Desc(less func(a, b string) bool) func(a, b string) bool {
2182 2189
 	return func(a, b string) bool { return less(b, a) }
2183 2190
 }
2191
+
2192
+//// Wrappers around btree Ascend/Descend
2193
+
2194
+func bLT(tr *btree.BTree, a, b interface{}) bool { return tr.Less(a, b) }
2195
+func bGT(tr *btree.BTree, a, b interface{}) bool { return tr.Less(b, a) }
2196
+
2197
+// func bLTE(tr *btree.BTree, a, b interface{}) bool { return !tr.Less(b, a) }
2198
+// func bGTE(tr *btree.BTree, a, b interface{}) bool { return !tr.Less(a, b) }
2199
+
2200
+// Ascend
2201
+
2202
+func btreeAscend(tr *btree.BTree, iter func(item interface{}) bool) {
2203
+	tr.Ascend(nil, iter)
2204
+}
2205
+
2206
+func btreeAscendLessThan(tr *btree.BTree, pivot interface{},
2207
+	iter func(item interface{}) bool,
2208
+) {
2209
+	tr.Ascend(nil, func(item interface{}) bool {
2210
+		return bLT(tr, item, pivot) && iter(item)
2211
+	})
2212
+}
2213
+
2214
+func btreeAscendGreaterOrEqual(tr *btree.BTree, pivot interface{},
2215
+	iter func(item interface{}) bool,
2216
+) {
2217
+	tr.Ascend(pivot, iter)
2218
+}
2219
+
2220
+func btreeAscendRange(tr *btree.BTree, greaterOrEqual, lessThan interface{},
2221
+	iter func(item interface{}) bool,
2222
+) {
2223
+	tr.Ascend(greaterOrEqual, func(item interface{}) bool {
2224
+		return bLT(tr, item, lessThan) && iter(item)
2225
+	})
2226
+}
2227
+
2228
+// Descend
2229
+
2230
+func btreeDescend(tr *btree.BTree, iter func(item interface{}) bool) {
2231
+	tr.Descend(nil, iter)
2232
+}
2233
+
2234
+func btreeDescendGreaterThan(tr *btree.BTree, pivot interface{},
2235
+	iter func(item interface{}) bool,
2236
+) {
2237
+	tr.Descend(nil, func(item interface{}) bool {
2238
+		return bGT(tr, item, pivot) && iter(item)
2239
+	})
2240
+}
2241
+
2242
+func btreeDescendRange(tr *btree.BTree, lessOrEqual, greaterThan interface{},
2243
+	iter func(item interface{}) bool,
2244
+) {
2245
+	tr.Descend(lessOrEqual, func(item interface{}) bool {
2246
+		return bGT(tr, item, greaterThan) && iter(item)
2247
+	})
2248
+}
2249
+
2250
+func btreeDescendLessOrEqual(tr *btree.BTree, pivot interface{},
2251
+	iter func(item interface{}) bool,
2252
+) {
2253
+	tr.Descend(pivot, iter)
2254
+}

+ 4
- 4
vendor/github.com/tidwall/buntdb/go.mod View File

@@ -1,12 +1,12 @@
1 1
 module github.com/tidwall/buntdb
2 2
 
3
-go 1.13
3
+go 1.15
4 4
 
5 5
 require (
6
-	github.com/tidwall/btree v0.0.0-20191029221954-400434d76274
7
-	github.com/tidwall/gjson v1.3.4
6
+	github.com/tidwall/btree v0.2.2
7
+	github.com/tidwall/gjson v1.6.1
8 8
 	github.com/tidwall/grect v0.0.0-20161006141115-ba9a043346eb
9 9
 	github.com/tidwall/match v1.0.1
10
-	github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e
10
+	github.com/tidwall/rtree v0.0.0-20201027154624-32188eeb08a8
11 11
 	github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 // indirect
12 12
 )

+ 8
- 8
vendor/github.com/tidwall/buntdb/go.sum View File

@@ -1,14 +1,14 @@
1
-github.com/tidwall/btree v0.0.0-20191029221954-400434d76274 h1:G6Z6HvJuPjG6XfNGi/feOATzeJrfgTNJY+rGrHbA04E=
2
-github.com/tidwall/btree v0.0.0-20191029221954-400434d76274/go.mod h1:huei1BkDWJ3/sLXmO+bsCNELL+Bp2Kks9OLyQFkzvA8=
3
-github.com/tidwall/gjson v1.3.4 h1:On5waDnyKKk3SWE4EthbjjirAWXp43xx5cKCUZY1eZw=
4
-github.com/tidwall/gjson v1.3.4/go.mod h1:P256ACg0Mn+j1RXIDXoss50DeIABTYK1PULOJHhxOls=
1
+github.com/tidwall/btree v0.2.2 h1:VVo0JW/tdidNdQzNsDR4wMbL3heaxA1DGleyzQ3/niY=
2
+github.com/tidwall/btree v0.2.2/go.mod h1:huei1BkDWJ3/sLXmO+bsCNELL+Bp2Kks9OLyQFkzvA8=
3
+github.com/tidwall/gjson v1.6.1 h1:LRbvNuNuvAiISWg6gxLEFuCe72UKy5hDqhxW/8183ws=
4
+github.com/tidwall/gjson v1.6.1/go.mod h1:BaHyNc5bjzYkPqgLq7mdVzeiRtULKULXLgZFKsxEHI0=
5 5
 github.com/tidwall/grect v0.0.0-20161006141115-ba9a043346eb h1:5NSYaAdrnblKByzd7XByQEJVT8+9v0W/tIY0Oo4OwrE=
6 6
 github.com/tidwall/grect v0.0.0-20161006141115-ba9a043346eb/go.mod h1:lKYYLFIr9OIgdgrtgkZ9zgRxRdvPYsExnYBsEAd8W5M=
7 7
 github.com/tidwall/match v1.0.1 h1:PnKP62LPNxHKTwvHHZZzdOAOCtsJTjo6dZLCwpKm5xc=
8 8
 github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E=
9
-github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
10
-github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
11
-github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e h1:+NL1GDIUOKxVfbp2KoJQD9cTQ6dyP2co9q4yzmT9FZo=
12
-github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e/go.mod h1:/h+UnNGt0IhNNJLkGikcdcJqm66zGD/uJGMRxK/9+Ao=
9
+github.com/tidwall/pretty v1.0.2 h1:Z7S3cePv9Jwm1KwS0513MRaoUe3S01WPbLNV40pwWZU=
10
+github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
11
+github.com/tidwall/rtree v0.0.0-20201027154624-32188eeb08a8 h1:BsKSRhu0TDB6Snq8SutN9KQHc6vqHEXJTcAFwyGNius=
12
+github.com/tidwall/rtree v0.0.0-20201027154624-32188eeb08a8/go.mod h1:/h+UnNGt0IhNNJLkGikcdcJqm66zGD/uJGMRxK/9+Ao=
13 13
 github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 h1:Otn9S136ELckZ3KKDyCkxapfufrqDqwmGjcHfAyXRrE=
14 14
 github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563/go.mod h1:mLqSmt7Dv/CNneF2wfcChfN1rvapyQr01LGKnKex0DQ=

+ 5
- 1
vendor/github.com/tidwall/gjson/README.md View File

@@ -193,11 +193,15 @@ we'll get `children` array and reverse the order:
193 193
 "children|@reverse|0"         >> "Jack"
194 194
 ```
195 195
 
196
-There are currently three built-in modifiers:
196
+There are currently the following built-in modifiers:
197 197
 
198 198
 - `@reverse`: Reverse an array or the members of an object.
199 199
 - `@ugly`: Remove all whitespace from a json document.
200 200
 - `@pretty`: Make the json document more human readable.
201
+- `@this`: Returns the current element. It can be used to retrieve the root element.
202
+- `@valid`: Ensure the json document is valid.
203
+- `@flatten`: Flattens an array.
204
+- `@join`: Joins multiple objects into a single object.
201 205
 
202 206
 ### Modifier arguments
203 207
 

+ 13
- 1
vendor/github.com/tidwall/gjson/SYNTAX.md View File

@@ -77,6 +77,14 @@ Special purpose characters, such as `.`, `*`, and `?` can be escaped with `\`.
77 77
 fav\.movie             "Deer Hunter"
78 78
 ```
79 79
 
80
+You'll also need to make sure that the `\` character is correctly escaped when hardcoding a path in source code.
81
+
82
+```go
83
+res := gjson.Get(json, "fav\\.movie")  // must escape the slash
84
+res := gjson.Get(json, `fav\.movie`)   // no need to escape the slash 
85
+
86
+```
87
+
80 88
 ### Arrays
81 89
 
82 90
 The `#` character allows for digging into JSON Arrays.
@@ -181,11 +189,15 @@ children.@reverse                   ["Jack","Alex","Sara"]
181 189
 children.@reverse.0                 "Jack"
182 190
 ```
183 191
 
184
-There are currently three built-in modifiers:
192
+There are currently the following built-in modifiers:
185 193
 
186 194
 - `@reverse`: Reverse an array or the members of an object.
187 195
 - `@ugly`: Remove all whitespace from JSON.
188 196
 - `@pretty`: Make the JSON more human readable.
197
+- `@this`: Returns the current element. It can be used to retrieve the root element.
198
+- `@valid`: Ensure the json document is valid.
199
+- `@flatten`: Flattens an array.
200
+- `@join`: Joins multiple objects into a single object.
189 201
 
190 202
 #### Modifier arguments
191 203
 

+ 221
- 149
vendor/github.com/tidwall/gjson/gjson.go View File

@@ -2,17 +2,14 @@
2 2
 package gjson
3 3
 
4 4
 import (
5
-	"encoding/base64"
6 5
 	"encoding/json"
7
-	"errors"
8 6
 	"reflect"
9 7
 	"strconv"
10 8
 	"strings"
11
-	"sync"
12
-	"sync/atomic"
13 9
 	"time"
14 10
 	"unicode/utf16"
15 11
 	"unicode/utf8"
12
+	"unsafe"
16 13
 
17 14
 	"github.com/tidwall/match"
18 15
 	"github.com/tidwall/pretty"
@@ -464,11 +461,13 @@ func ParseBytes(json []byte) Result {
464 461
 }
465 462
 
466 463
 func squash(json string) string {
467
-	// expects that the lead character is a '[' or '{' or '('
464
+	// expects that the lead character is a '[' or '{' or '(' or '"'
468 465
 	// squash the value, ignoring all nested arrays and objects.
469
-	// the first '[' or '{' or '(', has already been read
470
-	depth := 1
471
-	for i := 1; i < len(json); i++ {
466
+	var i, depth int
467
+	if json[0] != '"' {
468
+		i, depth = 1, 1
469
+	}
470
+	for ; i < len(json); i++ {
472 471
 		if json[i] >= '"' && json[i] <= '}' {
473 472
 			switch json[i] {
474 473
 			case '"':
@@ -495,6 +494,9 @@ func squash(json string) string {
495 494
 						break
496 495
 					}
497 496
 				}
497
+				if depth == 0 {
498
+					return json[:i+1]
499
+				}
498 500
 			case '{', '[', '(':
499 501
 				depth++
500 502
 			case '}', ']', ')':
@@ -1984,7 +1986,7 @@ func runeit(json string) rune {
1984 1986
 }
1985 1987
 
1986 1988
 // unescape unescapes a string
1987
-func unescape(json string) string { //, error) {
1989
+func unescape(json string) string {
1988 1990
 	var str = make([]byte, 0, len(json))
1989 1991
 	for i := 0; i < len(json); i++ {
1990 1992
 		switch {
@@ -2194,145 +2196,6 @@ func GetManyBytes(json []byte, path ...string) []Result {
2194 2196
 	return res
2195 2197
 }
2196 2198
 
2197
-var fieldsmu sync.RWMutex
2198
-var fields = make(map[string]map[string]int)
2199
-
2200
-func assign(jsval Result, goval reflect.Value) {
2201
-	if jsval.Type == Null {
2202
-		return
2203
-	}
2204
-	switch goval.Kind() {
2205
-	default:
2206
-	case reflect.Ptr:
2207
-		if !goval.IsNil() {
2208
-			newval := reflect.New(goval.Elem().Type())
2209
-			assign(jsval, newval.Elem())
2210
-			goval.Elem().Set(newval.Elem())
2211
-		} else {
2212
-			newval := reflect.New(goval.Type().Elem())
2213
-			assign(jsval, newval.Elem())
2214
-			goval.Set(newval)
2215
-		}
2216
-	case reflect.Struct:
2217
-		fieldsmu.RLock()
2218
-		sf := fields[goval.Type().String()]
2219
-		fieldsmu.RUnlock()
2220
-		if sf == nil {
2221
-			fieldsmu.Lock()
2222
-			sf = make(map[string]int)
2223
-			for i := 0; i < goval.Type().NumField(); i++ {
2224
-				f := goval.Type().Field(i)
2225
-				tag := strings.Split(f.Tag.Get("json"), ",")[0]
2226
-				if tag != "-" {
2227
-					if tag != "" {
2228
-						sf[tag] = i
2229
-						sf[f.Name] = i
2230
-					} else {
2231
-						sf[f.Name] = i
2232
-					}
2233
-				}
2234
-			}
2235
-			fields[goval.Type().String()] = sf
2236
-			fieldsmu.Unlock()
2237
-		}
2238
-		jsval.ForEach(func(key, value Result) bool {
2239
-			if idx, ok := sf[key.Str]; ok {
2240
-				f := goval.Field(idx)
2241
-				if f.CanSet() {
2242
-					assign(value, f)
2243
-				}
2244
-			}
2245
-			return true
2246
-		})
2247
-	case reflect.Slice:
2248
-		if goval.Type().Elem().Kind() == reflect.Uint8 &&
2249
-			jsval.Type == String {
2250
-			data, _ := base64.StdEncoding.DecodeString(jsval.String())
2251
-			goval.Set(reflect.ValueOf(data))
2252
-		} else {
2253
-			jsvals := jsval.Array()
2254
-			slice := reflect.MakeSlice(goval.Type(), len(jsvals), len(jsvals))
2255
-			for i := 0; i < len(jsvals); i++ {
2256
-				assign(jsvals[i], slice.Index(i))
2257
-			}
2258
-			goval.Set(slice)
2259
-		}
2260
-	case reflect.Array:
2261
-		i, n := 0, goval.Len()
2262
-		jsval.ForEach(func(_, value Result) bool {
2263
-			if i == n {
2264
-				return false
2265
-			}
2266
-			assign(value, goval.Index(i))
2267
-			i++
2268
-			return true
2269
-		})
2270
-	case reflect.Map:
2271
-		if goval.Type().Key().Kind() == reflect.String &&
2272
-			goval.Type().Elem().Kind() == reflect.Interface {
2273
-			goval.Set(reflect.ValueOf(jsval.Value()))
2274
-		}
2275
-	case reflect.Interface:
2276
-		goval.Set(reflect.ValueOf(jsval.Value()))
2277
-	case reflect.Bool:
2278
-		goval.SetBool(jsval.Bool())
2279
-	case reflect.Float32, reflect.Float64:
2280
-		goval.SetFloat(jsval.Float())
2281
-	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32,
2282
-		reflect.Int64:
2283
-		goval.SetInt(jsval.Int())
2284
-	case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32,
2285
-		reflect.Uint64:
2286
-		goval.SetUint(jsval.Uint())
2287
-	case reflect.String:
2288
-		goval.SetString(jsval.String())
2289
-	}
2290
-	if len(goval.Type().PkgPath()) > 0 {
2291
-		v := goval.Addr()
2292
-		if v.Type().NumMethod() > 0 {
2293
-			if u, ok := v.Interface().(json.Unmarshaler); ok {
2294
-				u.UnmarshalJSON([]byte(jsval.Raw))
2295
-			}
2296
-		}
2297
-	}
2298
-}
2299
-
2300
-var validate uintptr = 1
2301
-
2302
-// UnmarshalValidationEnabled provides the option to disable JSON validation
2303
-// during the Unmarshal routine. Validation is enabled by default.
2304
-//
2305
-// Deprecated: Use encoder/json.Unmarshal instead
2306
-func UnmarshalValidationEnabled(enabled bool) {
2307
-	if enabled {
2308
-		atomic.StoreUintptr(&validate, 1)
2309
-	} else {
2310
-		atomic.StoreUintptr(&validate, 0)
2311
-	}
2312
-}
2313
-
2314
-// Unmarshal loads the JSON data into the value pointed to by v.
2315
-//
2316
-// This function works almost identically to json.Unmarshal except  that
2317
-// gjson.Unmarshal will automatically attempt to convert JSON values to any Go
2318
-// type. For example, the JSON string "100" or the JSON number 100 can be
2319
-// equally assigned to Go string, int, byte, uint64, etc. This rule applies to
2320
-// all types.
2321
-//
2322
-// Deprecated: Use encoder/json.Unmarshal instead
2323
-func Unmarshal(data []byte, v interface{}) error {
2324
-	if atomic.LoadUintptr(&validate) == 1 {
2325
-		_, ok := validpayload(data, 0)
2326
-		if !ok {
2327
-			return errors.New("invalid json")
2328
-		}
2329
-	}
2330
-	if v := reflect.ValueOf(v); v.Kind() == reflect.Ptr {
2331
-		assign(ParseBytes(data), v)
2332
-	}
2333
-	return nil
2334
-}
2335
-
2336 2199
 func validpayload(data []byte, i int) (outi int, ok bool) {
2337 2200
 	for ; i < len(data); i++ {
2338 2201
 		switch data[i] {
@@ -2713,7 +2576,7 @@ func execModifier(json, path string) (pathOut, res string, ok bool) {
2713 2576
 			case '{', '[', '"':
2714 2577
 				res := Parse(pathOut)
2715 2578
 				if res.Exists() {
2716
-					_, args = parseSquash(pathOut, 0)
2579
+					args = squash(pathOut)
2717 2580
 					pathOut = pathOut[len(args):]
2718 2581
 					parsedArgs = true
2719 2582
 				}
@@ -2734,6 +2597,15 @@ func execModifier(json, path string) (pathOut, res string, ok bool) {
2734 2597
 	return pathOut, res, false
2735 2598
 }
2736 2599
 
2600
+// unwrap removes the '[]' or '{}' characters around json
2601
+func unwrap(json string) string {
2602
+	json = trim(json)
2603
+	if len(json) >= 2 && json[0] == '[' || json[0] == '{' {
2604
+		json = json[1 : len(json)-1]
2605
+	}
2606
+	return json
2607
+}
2608
+
2737 2609
 // DisableModifiers will disable the modifier syntax
2738 2610
 var DisableModifiers = false
2739 2611
 
@@ -2741,6 +2613,10 @@ var modifiers = map[string]func(json, arg string) string{
2741 2613
 	"pretty":  modPretty,
2742 2614
 	"ugly":    modUgly,
2743 2615
 	"reverse": modReverse,
2616
+	"this":    modThis,
2617
+	"flatten": modFlatten,
2618
+	"join":    modJoin,
2619
+	"valid":   modValid,
2744 2620
 }
2745 2621
 
2746 2622
 // AddModifier binds a custom modifier command to the GJSON syntax.
@@ -2778,6 +2654,11 @@ func modPretty(json, arg string) string {
2778 2654
 	return bytesString(pretty.Pretty(stringBytes(json)))
2779 2655
 }
2780 2656
 
2657
+// @this returns the current element. Can be used to retrieve the root element.
2658
+func modThis(json, arg string) string {
2659
+	return json
2660
+}
2661
+
2781 2662
 // @ugly modifier removes all whitespace.
2782 2663
 func modUgly(json, arg string) string {
2783 2664
 	return bytesString(pretty.Ugly(stringBytes(json)))
@@ -2824,3 +2705,194 @@ func modReverse(json, arg string) string {
2824 2705
 	}
2825 2706
 	return json
2826 2707
 }
2708
+
2709
+// @flatten an array with child arrays.
2710
+//   [1,[2],[3,4],[5,[6,7]]] -> [1,2,3,4,5,[6,7]]
2711
+// The {"deep":true} arg can be provide for deep flattening.
2712
+//   [1,[2],[3,4],[5,[6,7]]] -> [1,2,3,4,5,6,7]
2713
+// The original json is returned when the json is not an array.
2714
+func modFlatten(json, arg string) string {
2715
+	res := Parse(json)
2716
+	if !res.IsArray() {
2717
+		return json
2718
+	}
2719
+	var deep bool
2720
+	if arg != "" {
2721
+		Parse(arg).ForEach(func(key, value Result) bool {
2722
+			if key.String() == "deep" {
2723
+				deep = value.Bool()
2724
+			}
2725
+			return true
2726
+		})
2727
+	}
2728
+	var out []byte
2729
+	out = append(out, '[')
2730
+	var idx int
2731
+	res.ForEach(func(_, value Result) bool {
2732
+		if idx > 0 {
2733
+			out = append(out, ',')
2734
+		}
2735
+		if value.IsArray() {
2736
+			if deep {
2737
+				out = append(out, unwrap(modFlatten(value.Raw, arg))...)
2738
+			} else {
2739
+				out = append(out, unwrap(value.Raw)...)
2740
+			}
2741
+		} else {
2742
+			out = append(out, value.Raw...)
2743
+		}
2744
+		idx++
2745
+		return true
2746
+	})
2747
+	out = append(out, ']')
2748
+	return bytesString(out)
2749
+}
2750
+
2751
+// @join multiple objects into a single object.
2752
+//   [{"first":"Tom"},{"last":"Smith"}] -> {"first","Tom","last":"Smith"}
2753
+// The arg can be "true" to specify that duplicate keys should be preserved.
2754
+//   [{"first":"Tom","age":37},{"age":41}] -> {"first","Tom","age":37,"age":41}
2755
+// Without preserved keys:
2756
+//   [{"first":"Tom","age":37},{"age":41}] -> {"first","Tom","age":41}
2757
+// The original json is returned when the json is not an object.
2758
+func modJoin(json, arg string) string {
2759
+	res := Parse(json)
2760
+	if !res.IsArray() {
2761
+		return json
2762
+	}
2763
+	var preserve bool
2764
+	if arg != "" {
2765
+		Parse(arg).ForEach(func(key, value Result) bool {
2766
+			if key.String() == "preserve" {
2767
+				preserve = value.Bool()
2768
+			}
2769
+			return true
2770
+		})
2771
+	}
2772
+	var out []byte
2773
+	out = append(out, '{')
2774
+	if preserve {
2775
+		// Preserve duplicate keys.
2776
+		var idx int
2777
+		res.ForEach(func(_, value Result) bool {
2778
+			if !value.IsObject() {
2779
+				return true
2780
+			}
2781
+			if idx > 0 {
2782
+				out = append(out, ',')
2783
+			}
2784
+			out = append(out, unwrap(value.Raw)...)
2785
+			idx++
2786
+			return true
2787
+		})
2788
+	} else {
2789
+		// Deduplicate keys and generate an object with stable ordering.
2790
+		var keys []Result
2791
+		kvals := make(map[string]Result)
2792
+		res.ForEach(func(_, value Result) bool {
2793
+			if !value.IsObject() {
2794
+				return true
2795
+			}
2796
+			value.ForEach(func(key, value Result) bool {
2797
+				k := key.String()
2798
+				if _, ok := kvals[k]; !ok {
2799
+					keys = append(keys, key)
2800
+				}
2801
+				kvals[k] = value
2802
+				return true
2803
+			})
2804
+			return true
2805
+		})
2806
+		for i := 0; i < len(keys); i++ {
2807
+			if i > 0 {
2808
+				out = append(out, ',')
2809
+			}
2810
+			out = append(out, keys[i].Raw...)
2811
+			out = append(out, ':')
2812
+			out = append(out, kvals[keys[i].String()].Raw...)
2813
+		}
2814
+	}
2815
+	out = append(out, '}')
2816
+	return bytesString(out)
2817
+}
2818
+
2819
+// @valid ensures that the json is valid before moving on. An empty string is
2820
+// returned when the json is not valid, otherwise it returns the original json.
2821
+func modValid(json, arg string) string {
2822
+	if !Valid(json) {
2823
+		return ""
2824
+	}
2825
+	return json
2826
+}
2827
+
2828
+// getBytes casts the input json bytes to a string and safely returns the
2829
+// results as uniquely allocated data. This operation is intended to minimize
2830
+// copies and allocations for the large json string->[]byte.
2831
+func getBytes(json []byte, path string) Result {
2832
+	var result Result
2833
+	if json != nil {
2834
+		// unsafe cast to string
2835
+		result = Get(*(*string)(unsafe.Pointer(&json)), path)
2836
+		// safely get the string headers
2837
+		rawhi := *(*reflect.StringHeader)(unsafe.Pointer(&result.Raw))
2838
+		strhi := *(*reflect.StringHeader)(unsafe.Pointer(&result.Str))
2839
+		// create byte slice headers
2840
+		rawh := reflect.SliceHeader{Data: rawhi.Data, Len: rawhi.Len}
2841
+		strh := reflect.SliceHeader{Data: strhi.Data, Len: strhi.Len}
2842
+		if strh.Data == 0 {
2843
+			// str is nil
2844
+			if rawh.Data == 0 {
2845
+				// raw is nil
2846
+				result.Raw = ""
2847
+			} else {
2848
+				// raw has data, safely copy the slice header to a string
2849
+				result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh)))
2850
+			}
2851
+			result.Str = ""
2852
+		} else if rawh.Data == 0 {
2853
+			// raw is nil
2854
+			result.Raw = ""
2855
+			// str has data, safely copy the slice header to a string
2856
+			result.Str = string(*(*[]byte)(unsafe.Pointer(&strh)))
2857
+		} else if strh.Data >= rawh.Data &&
2858
+			int(strh.Data)+strh.Len <= int(rawh.Data)+rawh.Len {
2859
+			// Str is a substring of Raw.
2860
+			start := int(strh.Data - rawh.Data)
2861
+			// safely copy the raw slice header
2862
+			result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh)))
2863
+			// substring the raw
2864
+			result.Str = result.Raw[start : start+strh.Len]
2865
+		} else {
2866
+			// safely copy both the raw and str slice headers to strings
2867
+			result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh)))
2868
+			result.Str = string(*(*[]byte)(unsafe.Pointer(&strh)))
2869
+		}
2870
+	}
2871
+	return result
2872
+}
2873
+
2874
+// fillIndex finds the position of Raw data and assigns it to the Index field
2875
+// of the resulting value. If the position cannot be found then Index zero is
2876
+// used instead.
2877
+func fillIndex(json string, c *parseContext) {
2878
+	if len(c.value.Raw) > 0 && !c.calcd {
2879
+		jhdr := *(*reflect.StringHeader)(unsafe.Pointer(&json))
2880
+		rhdr := *(*reflect.StringHeader)(unsafe.Pointer(&(c.value.Raw)))
2881
+		c.value.Index = int(rhdr.Data - jhdr.Data)
2882
+		if c.value.Index < 0 || c.value.Index >= len(json) {
2883
+			c.value.Index = 0
2884
+		}
2885
+	}
2886
+}
2887
+
2888
+func stringBytes(s string) []byte {
2889
+	return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{
2890
+		Data: (*reflect.StringHeader)(unsafe.Pointer(&s)).Data,
2891
+		Len:  len(s),
2892
+		Cap:  len(s),
2893
+	}))
2894
+}
2895
+
2896
+func bytesString(b []byte) string {
2897
+	return *(*string)(unsafe.Pointer(&b))
2898
+}

+ 0
- 18
vendor/github.com/tidwall/gjson/gjson_gae.go View File

@@ -1,18 +0,0 @@
1
-//+build appengine js
2
-
3
-package gjson
4
-
5
-func getBytes(json []byte, path string) Result {
6
-	return Get(string(json), path)
7
-}
8
-func fillIndex(json string, c *parseContext) {
9
-	// noop. Use zero for the Index value.
10
-}
11
-
12
-func stringBytes(s string) []byte {
13
-	return []byte(s)
14
-}
15
-
16
-func bytesString(b []byte) string {
17
-	return string(b)
18
-}

+ 0
- 81
vendor/github.com/tidwall/gjson/gjson_ngae.go View File

@@ -1,81 +0,0 @@
1
-//+build !appengine
2
-//+build !js
3
-
4
-package gjson
5
-
6
-import (
7
-	"reflect"
8
-	"unsafe"
9
-)
10
-
11
-// getBytes casts the input json bytes to a string and safely returns the
12
-// results as uniquely allocated data. This operation is intended to minimize
13
-// copies and allocations for the large json string->[]byte.
14
-func getBytes(json []byte, path string) Result {
15
-	var result Result
16
-	if json != nil {
17
-		// unsafe cast to string
18
-		result = Get(*(*string)(unsafe.Pointer(&json)), path)
19
-		// safely get the string headers
20
-		rawhi := *(*reflect.StringHeader)(unsafe.Pointer(&result.Raw))
21
-		strhi := *(*reflect.StringHeader)(unsafe.Pointer(&result.Str))
22
-		// create byte slice headers
23
-		rawh := reflect.SliceHeader{Data: rawhi.Data, Len: rawhi.Len}
24
-		strh := reflect.SliceHeader{Data: strhi.Data, Len: strhi.Len}
25
-		if strh.Data == 0 {
26
-			// str is nil
27
-			if rawh.Data == 0 {
28
-				// raw is nil
29
-				result.Raw = ""
30
-			} else {
31
-				// raw has data, safely copy the slice header to a string
32
-				result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh)))
33
-			}
34
-			result.Str = ""
35
-		} else if rawh.Data == 0 {
36
-			// raw is nil
37
-			result.Raw = ""
38
-			// str has data, safely copy the slice header to a string
39
-			result.Str = string(*(*[]byte)(unsafe.Pointer(&strh)))
40
-		} else if strh.Data >= rawh.Data &&
41
-			int(strh.Data)+strh.Len <= int(rawh.Data)+rawh.Len {
42
-			// Str is a substring of Raw.
43
-			start := int(strh.Data - rawh.Data)
44
-			// safely copy the raw slice header
45
-			result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh)))
46
-			// substring the raw
47
-			result.Str = result.Raw[start : start+strh.Len]
48
-		} else {
49
-			// safely copy both the raw and str slice headers to strings
50
-			result.Raw = string(*(*[]byte)(unsafe.Pointer(&rawh)))
51
-			result.Str = string(*(*[]byte)(unsafe.Pointer(&strh)))
52
-		}
53
-	}
54
-	return result
55
-}
56
-
57
-// fillIndex finds the position of Raw data and assigns it to the Index field
58
-// of the resulting value. If the position cannot be found then Index zero is
59
-// used instead.
60
-func fillIndex(json string, c *parseContext) {
61
-	if len(c.value.Raw) > 0 && !c.calcd {
62
-		jhdr := *(*reflect.StringHeader)(unsafe.Pointer(&json))
63
-		rhdr := *(*reflect.StringHeader)(unsafe.Pointer(&(c.value.Raw)))
64
-		c.value.Index = int(rhdr.Data - jhdr.Data)
65
-		if c.value.Index < 0 || c.value.Index >= len(json) {
66
-			c.value.Index = 0
67
-		}
68
-	}
69
-}
70
-
71
-func stringBytes(s string) []byte {
72
-	return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{
73
-		Data: (*reflect.StringHeader)(unsafe.Pointer(&s)).Data,
74
-		Len:  len(s),
75
-		Cap:  len(s),
76
-	}))
77
-}
78
-
79
-func bytesString(b []byte) string {
80
-	return *(*string)(unsafe.Pointer(&b))
81
-}

+ 1
- 1
vendor/github.com/tidwall/gjson/go.mod View File

@@ -4,5 +4,5 @@ go 1.12
4 4
 
5 5
 require (
6 6
 	github.com/tidwall/match v1.0.1
7
-	github.com/tidwall/pretty v1.0.0
7
+	github.com/tidwall/pretty v1.0.2
8 8
 )

+ 2
- 2
vendor/github.com/tidwall/gjson/go.sum View File

@@ -1,4 +1,4 @@
1 1
 github.com/tidwall/match v1.0.1 h1:PnKP62LPNxHKTwvHHZZzdOAOCtsJTjo6dZLCwpKm5xc=
2 2
 github.com/tidwall/match v1.0.1/go.mod h1:LujAq0jyVjBy028G1WhWfIzbpQfMO8bBZ6Tyb0+pL9E=
3
-github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
4
-github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
3
+github.com/tidwall/pretty v1.0.2 h1:Z7S3cePv9Jwm1KwS0513MRaoUe3S01WPbLNV40pwWZU=
4
+github.com/tidwall/pretty v1.0.2/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=

+ 1
- 1
vendor/github.com/tidwall/pretty/README.md View File

@@ -1,7 +1,7 @@
1 1
 # Pretty
2 2
 [![Build Status](https://img.shields.io/travis/tidwall/pretty.svg?style=flat-square)](https://travis-ci.org/tidwall/prettty)
3 3
 [![Coverage Status](https://img.shields.io/badge/coverage-100%25-brightgreen.svg?style=flat-square)](http://gocover.io/github.com/tidwall/pretty)
4
-[![GoDoc](https://img.shields.io/badge/api-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/tidwall/pretty) 
4
+[![GoDoc](https://img.shields.io/badge/api-reference-blue.svg?style=flat-square)](https://pkg.go.dev/github.com/tidwall/pretty) 
5 5
 
6 6
 
7 7
 Pretty is a Go package that provides [fast](#performance) methods for formatting JSON for human readability, or to compact JSON for smaller payloads.

+ 19
- 15
vendor/github.com/tidwall/pretty/pretty.go View File

@@ -318,21 +318,25 @@ func hexp(p byte) byte {
318 318
 }
319 319
 
320 320
 // TerminalStyle is for terminals
321
-var TerminalStyle = &Style{
322
-	Key:    [2]string{"\x1B[94m", "\x1B[0m"},
323
-	String: [2]string{"\x1B[92m", "\x1B[0m"},
324
-	Number: [2]string{"\x1B[93m", "\x1B[0m"},
325
-	True:   [2]string{"\x1B[96m", "\x1B[0m"},
326
-	False:  [2]string{"\x1B[96m", "\x1B[0m"},
327
-	Null:   [2]string{"\x1B[91m", "\x1B[0m"},
328
-	Append: func(dst []byte, c byte) []byte {
329
-		if c < ' ' && (c != '\r' && c != '\n' && c != '\t' && c != '\v') {
330
-			dst = append(dst, "\\u00"...)
331
-			dst = append(dst, hexp((c>>4)&0xF))
332
-			return append(dst, hexp((c)&0xF))
333
-		}
334
-		return append(dst, c)
335
-	},
321
+var TerminalStyle *Style
322
+
323
+func init() {
324
+	TerminalStyle = &Style{
325
+		Key:    [2]string{"\x1B[94m", "\x1B[0m"},
326
+		String: [2]string{"\x1B[92m", "\x1B[0m"},
327
+		Number: [2]string{"\x1B[93m", "\x1B[0m"},
328
+		True:   [2]string{"\x1B[96m", "\x1B[0m"},
329
+		False:  [2]string{"\x1B[96m", "\x1B[0m"},
330
+		Null:   [2]string{"\x1B[91m", "\x1B[0m"},
331
+		Append: func(dst []byte, c byte) []byte {
332
+			if c < ' ' && (c != '\r' && c != '\n' && c != '\t' && c != '\v') {
333
+				dst = append(dst, "\\u00"...)
334
+				dst = append(dst, hexp((c>>4)&0xF))
335
+				return append(dst, hexp((c)&0xF))
336
+			}
337
+			return append(dst, c)
338
+		},
339
+	}
336 340
 }
337 341
 
338 342
 // Color will colorize the json. The style parma is used for customizing

+ 1
- 0
vendor/github.com/tidwall/rtree/base/rtree.go View File

@@ -183,6 +183,7 @@ type treeItem struct {
183 183
 	item     interface{}
184 184
 }
185 185
 
186
+//go:nocheckptr
186 187
 func (item *treeItem) unsafeNode() *treeNode {
187 188
 	return (*treeNode)(unsafe.Pointer(item))
188 189
 }

+ 5
- 5
vendor/modules.txt View File

@@ -37,20 +37,20 @@ github.com/oragono/confusables
37 37
 github.com/oragono/go-ident
38 38
 # github.com/stretchr/testify v1.4.0
39 39
 ## explicit
40
-# github.com/tidwall/btree v0.0.0-20191029221954-400434d76274
40
+# github.com/tidwall/btree v0.2.2
41 41
 github.com/tidwall/btree
42
-# github.com/tidwall/buntdb v1.1.2
42
+# github.com/tidwall/buntdb v1.1.4
43 43
 ## explicit
44 44
 github.com/tidwall/buntdb
45
-# github.com/tidwall/gjson v1.3.4
45
+# github.com/tidwall/gjson v1.6.1
46 46
 github.com/tidwall/gjson
47 47
 # github.com/tidwall/grect v0.0.0-20161006141115-ba9a043346eb
48 48
 github.com/tidwall/grect
49 49
 # github.com/tidwall/match v1.0.1
50 50
 github.com/tidwall/match
51
-# github.com/tidwall/pretty v1.0.0
51
+# github.com/tidwall/pretty v1.0.2
52 52
 github.com/tidwall/pretty
53
-# github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e
53
+# github.com/tidwall/rtree v0.0.0-20201027154624-32188eeb08a8
54 54
 github.com/tidwall/rtree
55 55
 github.com/tidwall/rtree/base
56 56
 # github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563

Loading…
Cancel
Save