mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
Upgrade to go 1.19 and update dependencies (#3069)
* Update to go 1.19 * Update dependencies * Update cross-compile script * Add missing targets to cross-compile-all * Update cache action to remove warning
This commit is contained in:
15
vendor/github.com/antchfx/xpath/README.md
generated
vendored
15
vendor/github.com/antchfx/xpath/README.md
generated
vendored
@@ -57,6 +57,7 @@ Supported Features
|
||||
|
||||
- `(a, b, c)` : Evaluates each of its operands and concatenates the resulting sequences, in order, into a single result sequence
|
||||
|
||||
- `(a/b)` : Selects all matches nodes as grouping set.
|
||||
|
||||
#### Node Axes
|
||||
|
||||
@@ -158,16 +159,4 @@ Supported Features
|
||||
`system-property()`| ✗ |
|
||||
`translate()`| ✓ |
|
||||
`true()`| ✓ |
|
||||
`unparsed-entity-url()` | ✗ |
|
||||
|
||||
Changelogs
|
||||
===
|
||||
|
||||
2019-03-19
|
||||
- optimize XPath `|` operation performance. [#33](https://github.com/antchfx/xpath/issues/33). Tips: suggest split into multiple subquery if you have a lot of `|` operations.
|
||||
|
||||
2019-01-29
|
||||
- improvement `normalize-space` function. [#32](https://github.com/antchfx/xpath/issues/32)
|
||||
|
||||
2018-12-07
|
||||
- supports XPath 2.0 Sequence expressions. [#30](https://github.com/antchfx/xpath/pull/30) by [@minherz](https://github.com/minherz).
|
||||
`unparsed-entity-url()` | ✗ |
|
||||
2
vendor/github.com/antchfx/xpath/build.go
generated
vendored
2
vendor/github.com/antchfx/xpath/build.go
generated
vendored
@@ -42,7 +42,7 @@ func axisPredicate(root *axisNode) func(NodeNavigator) bool {
|
||||
}
|
||||
nametest := root.LocalName != "" || root.Prefix != ""
|
||||
predicate := func(n NodeNavigator) bool {
|
||||
if typ == n.NodeType() || typ == allNode || typ == TextNode {
|
||||
if typ == n.NodeType() || typ == allNode {
|
||||
if nametest {
|
||||
if root.LocalName == n.LocalName() && root.Prefix == n.Prefix() {
|
||||
return true
|
||||
|
||||
10
vendor/github.com/antchfx/xpath/func.go
generated
vendored
10
vendor/github.com/antchfx/xpath/func.go
generated
vendored
@@ -122,17 +122,19 @@ func asNumber(t iterator, o interface{}) float64 {
|
||||
return typ
|
||||
case string:
|
||||
v, err := strconv.ParseFloat(typ, 64)
|
||||
if err != nil {
|
||||
panic(errors.New("ceiling() function argument type must be a node-set or number"))
|
||||
if err == nil {
|
||||
return v
|
||||
}
|
||||
return v
|
||||
}
|
||||
return 0
|
||||
return math.NaN()
|
||||
}
|
||||
|
||||
// ceilingFunc is a XPath Node Set functions ceiling(node-set).
|
||||
func ceilingFunc(q query, t iterator) interface{} {
|
||||
val := asNumber(t, functionArgs(q).Evaluate(t))
|
||||
// if math.IsNaN(val) {
|
||||
// panic(errors.New("ceiling() function argument type must be a valid number"))
|
||||
// }
|
||||
return math.Ceil(val)
|
||||
}
|
||||
|
||||
|
||||
2
vendor/github.com/antchfx/xpath/func_go110.go
generated
vendored
2
vendor/github.com/antchfx/xpath/func_go110.go
generated
vendored
@@ -11,6 +11,6 @@ func round(f float64) int {
|
||||
return int(math.Round(f))
|
||||
}
|
||||
|
||||
func newStringBuilder() stringBuilder{
|
||||
func newStringBuilder() stringBuilder {
|
||||
return &strings.Builder{}
|
||||
}
|
||||
|
||||
29
vendor/github.com/antchfx/xpath/operator.go
generated
vendored
29
vendor/github.com/antchfx/xpath/operator.go
generated
vendored
@@ -165,15 +165,28 @@ func cmpNodeSetString(t iterator, op string, m, n interface{}) bool {
|
||||
func cmpNodeSetNodeSet(t iterator, op string, m, n interface{}) bool {
|
||||
a := m.(query)
|
||||
b := n.(query)
|
||||
x := a.Select(t)
|
||||
if x == nil {
|
||||
return false
|
||||
for {
|
||||
x := a.Select(t)
|
||||
if x == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
y := b.Select(t)
|
||||
if y == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
for {
|
||||
if cmpStringStringF(op, x.Value(), y.Value()) {
|
||||
return true
|
||||
}
|
||||
if y = b.Select(t); y == nil {
|
||||
break
|
||||
}
|
||||
}
|
||||
// reset
|
||||
b.Evaluate(t)
|
||||
}
|
||||
y := b.Select(t)
|
||||
if y == nil {
|
||||
return false
|
||||
}
|
||||
return cmpStringStringF(op, x.Value(), y.Value())
|
||||
}
|
||||
|
||||
func cmpStringNumeric(t iterator, op string, m, n interface{}) bool {
|
||||
|
||||
4
vendor/github.com/antchfx/xpath/query.go
generated
vendored
4
vendor/github.com/antchfx/xpath/query.go
generated
vendored
@@ -820,6 +820,8 @@ func (b *booleanQuery) Select(t iterator) NodeNavigator {
|
||||
}
|
||||
|
||||
func (b *booleanQuery) Evaluate(t iterator) interface{} {
|
||||
n := t.Current().Copy()
|
||||
|
||||
m := b.Left.Evaluate(t)
|
||||
left := asBool(t, m)
|
||||
if b.IsOr && left {
|
||||
@@ -827,6 +829,8 @@ func (b *booleanQuery) Evaluate(t iterator) interface{} {
|
||||
} else if !b.IsOr && !left {
|
||||
return false
|
||||
}
|
||||
|
||||
t.Current().MoveTo(n)
|
||||
m = b.Right.Evaluate(t)
|
||||
return asBool(t, m)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user