From ed13b043eb78b8230da1d48b2e02cda23e05bba4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 06:57:38 +0000 Subject: [PATCH] chore(deps): bump github.com/beevik/etree from 1.4.0 to 1.4.1 Bumps [github.com/beevik/etree](https://github.com/beevik/etree) from 1.4.0 to 1.4.1. - [Release notes](https://github.com/beevik/etree/releases) - [Changelog](https://github.com/beevik/etree/blob/main/RELEASE_NOTES.md) - [Commits](https://github.com/beevik/etree/compare/v1.4.0...v1.4.1) --- updated-dependencies: - dependency-name: github.com/beevik/etree dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- go.mod | 2 +- go.sum | 4 +- .../github.com/beevik/etree/RELEASE_NOTES.md | 9 ++ vendor/github.com/beevik/etree/etree.go | 140 +++++++++--------- vendor/github.com/beevik/etree/helpers.go | 38 ++--- vendor/github.com/beevik/etree/path.go | 8 +- vendor/modules.txt | 4 +- 7 files changed, 106 insertions(+), 99 deletions(-) diff --git a/go.mod b/go.mod index c05ff987e..53ca56dcd 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/MicahParks/keyfunc v1.9.0 github.com/Nerzal/gocloak/v13 v13.9.0 github.com/bbalet/stopwords v1.0.0 - github.com/beevik/etree v1.4.0 + github.com/beevik/etree v1.4.1 github.com/blevesearch/bleve/v2 v2.4.2 github.com/cenkalti/backoff v2.2.1+incompatible github.com/coreos/go-oidc/v3 v3.11.0 diff --git a/go.sum b/go.sum index 0e90a59f1..4c3ec138e 100644 --- a/go.sum +++ b/go.sum @@ -139,8 +139,8 @@ github.com/aws/aws-sdk-go v1.45.1/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Ph github.com/bbalet/stopwords v1.0.0 h1:0TnGycCtY0zZi4ltKoOGRFIlZHv0WqpoIGUsObjztfo= github.com/bbalet/stopwords v1.0.0/go.mod h1:sAWrQoDMfqARGIn4s6dp7OW7ISrshUD8IP2q3KoqPjc= github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A= -github.com/beevik/etree v1.4.0 h1:oz1UedHRepuY3p4N5OjE0nK1WLCqtzHf25bxplKOHLs= -github.com/beevik/etree v1.4.0/go.mod h1:cyWiXwGoasx60gHvtnEh5x8+uIjUVnjWqBvEnhnqKDA= +github.com/beevik/etree v1.4.1 h1:PmQJDDYahBGNKDcpdX8uPy1xRCwoCGVUiW669MEirVI= +github.com/beevik/etree v1.4.1/go.mod h1:gPNJNaBGVZ9AwsidazFZyygnd+0pAU38N4D+WemwKNs= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= diff --git a/vendor/github.com/beevik/etree/RELEASE_NOTES.md b/vendor/github.com/beevik/etree/RELEASE_NOTES.md index 5471dd7ae..e82b02dda 100644 --- a/vendor/github.com/beevik/etree/RELEASE_NOTES.md +++ b/vendor/github.com/beevik/etree/RELEASE_NOTES.md @@ -1,3 +1,12 @@ +Release 1.4.1 +============= + +**Changes** + +* Minimal go version updated to 1.21. +* Default-initialized CharsetReader causes same result as NewDocument(). +* When reading an XML document, attributes are parsed more efficiently. + Release v1.4.0 ============== diff --git a/vendor/github.com/beevik/etree/etree.go b/vendor/github.com/beevik/etree/etree.go index 4fbebb608..536e4fc2a 100644 --- a/vendor/github.com/beevik/etree/etree.go +++ b/vendor/github.com/beevik/etree/etree.go @@ -13,7 +13,7 @@ import ( "errors" "io" "os" - "sort" + "slices" "strings" ) @@ -31,9 +31,14 @@ var ErrXML = errors.New("etree: invalid XML format") var cdataPrefix = []byte("= len(f.data) { f.grow() } @@ -50,33 +49,34 @@ func (f *fifo) add(value interface{}) { } } -func (f *fifo) remove() interface{} { +func (f *queue[E]) remove() E { value := f.data[f.head] - f.data[f.head] = nil + var empty E + f.data[f.head] = empty if f.head++; f.head == len(f.data) { f.head = 0 } return value } -func (f *fifo) len() int { +func (f *queue[E]) len() int { if f.tail >= f.head { return f.tail - f.head } return len(f.data) - f.head + f.tail } -func (f *fifo) grow() { +func (f *queue[E]) grow() { c := len(f.data) * 2 if c == 0 { c = 4 } - buf, count := make([]interface{}, c), f.len() + buf, count := make([]E, c), f.len() if f.tail >= f.head { - copy(buf[0:count], f.data[f.head:f.tail]) + copy(buf[:count], f.data[f.head:f.tail]) } else { hindex := len(f.data) - f.head - copy(buf[0:hindex], f.data[f.head:]) + copy(buf[:hindex], f.data[f.head:]) copy(buf[hindex:count], f.data[:f.tail]) } f.data, f.head, f.tail = buf, 0, count diff --git a/vendor/github.com/beevik/etree/path.go b/vendor/github.com/beevik/etree/path.go index 491dfc6e8..8d6309605 100644 --- a/vendor/github.com/beevik/etree/path.go +++ b/vendor/github.com/beevik/etree/path.go @@ -152,7 +152,7 @@ type filter interface { // a Path object. It collects and deduplicates all elements matching // the path query. type pather struct { - queue fifo + queue queue[node] results []*Element inResults map[*Element]bool candidates []*Element @@ -180,7 +180,7 @@ func newPather() *pather { // and filters. func (p *pather) traverse(e *Element, path Path) []*Element { for p.queue.add(node{e, path.segments}); p.queue.len() > 0; { - p.eval(p.queue.remove().(node)) + p.eval(p.queue.remove()) } return p.results } @@ -406,9 +406,9 @@ func (s *selectChildren) apply(e *Element, p *pather) { type selectDescendants struct{} func (s *selectDescendants) apply(e *Element, p *pather) { - var queue fifo + var queue queue[*Element] for queue.add(e); queue.len() > 0; { - e := queue.remove().(*Element) + e := queue.remove() p.candidates = append(p.candidates, e) for _, c := range e.Child { if c, ok := c.(*Element); ok { diff --git a/vendor/modules.txt b/vendor/modules.txt index ba2608bff..9830fd5bf 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -148,8 +148,8 @@ github.com/aws/aws-sdk-go/service/sts/stsiface # github.com/bbalet/stopwords v1.0.0 ## explicit github.com/bbalet/stopwords -# github.com/beevik/etree v1.4.0 -## explicit; go 1.16 +# github.com/beevik/etree v1.4.1 +## explicit; go 1.21.0 github.com/beevik/etree # github.com/beorn7/perks v1.0.1 ## explicit; go 1.11