mirror of
https://github.com/caddyserver/caddy.git
synced 2025-10-19 15:53:17 +00:00
ci: build and test with Go 1.23 (#6526)
* chore: build and test with Go 1.23 * ci: bump golangci-lint to v1.60 * fix: make properly wrap errors * ci: remove Go 1.21
This commit is contained in:
parent
4ade967005
commit
2028da4e74
8 changed files with 20 additions and 16 deletions
|
@ -340,7 +340,7 @@ func (celTypeAdapter) NativeToValue(value any) ref.Val {
|
|||
case time.Time:
|
||||
return types.Timestamp{Time: v}
|
||||
case error:
|
||||
types.NewErr(v.Error())
|
||||
return types.WrapErr(v)
|
||||
}
|
||||
return types.DefaultTypeAdapter.NativeToValue(value)
|
||||
}
|
||||
|
@ -499,7 +499,7 @@ func CELMatcherRuntimeFunction(funcName string, fac CELMatcherFactory) functions
|
|||
return func(celReq, matcherData ref.Val) ref.Val {
|
||||
matcher, err := fac(matcherData)
|
||||
if err != nil {
|
||||
return types.NewErr(err.Error())
|
||||
return types.WrapErr(err)
|
||||
}
|
||||
httpReq := celReq.Value().(celHTTPRequest)
|
||||
return types.Bool(matcher.Match(httpReq.Request))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue