build(deps): bump github.com/open-policy-agent/opa from 1.4.2 to 1.5.0
Bumps [github.com/open-policy-agent/opa](https://github.com/open-policy-agent/opa) from 1.4.2 to 1.5.0. - [Release notes](https://github.com/open-policy-agent/opa/releases) - [Changelog](https://github.com/open-policy-agent/opa/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-policy-agent/opa/compare/v1.4.2...v1.5.0) --- updated-dependencies: - dependency-name: github.com/open-policy-agent/opa dependency-version: 1.5.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
+1
-1
@@ -34,6 +34,6 @@ import (
|
||||
// Sets are considered equal if and only if the symmetric difference of a and b
|
||||
// is empty.
|
||||
// Other comparisons are consistent but not defined.
|
||||
func Compare(a, b interface{}) int {
|
||||
func Compare(a, b any) int {
|
||||
return v1.Compare(a, b)
|
||||
}
|
||||
|
||||
+1
-1
@@ -41,6 +41,6 @@ type ErrorDetails = v1.ErrorDetails
|
||||
type Error = v1.Error
|
||||
|
||||
// NewError returns a new Error object.
|
||||
func NewError(code string, loc *Location, f string, a ...interface{}) *Error {
|
||||
func NewError(code string, loc *Location, f string, a ...any) *Error {
|
||||
return v1.NewError(code, loc, f, a...)
|
||||
}
|
||||
|
||||
+2
-2
@@ -211,7 +211,7 @@ func NewBody(exprs ...*Expr) Body {
|
||||
}
|
||||
|
||||
// NewExpr returns a new Expr object.
|
||||
func NewExpr(terms interface{}) *Expr {
|
||||
func NewExpr(terms any) *Expr {
|
||||
return v1.NewExpr(terms)
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ func NewBuiltinExpr(terms ...*Term) *Expr {
|
||||
}
|
||||
|
||||
// Copy returns a deep copy of the AST node x. If x is not an AST node, x is returned unmodified.
|
||||
func Copy(x interface{}) interface{} {
|
||||
func Copy(x any) any {
|
||||
return v1.Copy(x)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -13,6 +13,6 @@ import (
|
||||
// Pretty writes a pretty representation of the AST rooted at x to w.
|
||||
//
|
||||
// This is function is intended for debug purposes when inspecting ASTs.
|
||||
func Pretty(w io.Writer, x interface{}) {
|
||||
func Pretty(w io.Writer, x any) {
|
||||
v1.Pretty(w, x)
|
||||
}
|
||||
|
||||
+1
-1
@@ -9,6 +9,6 @@ import (
|
||||
)
|
||||
|
||||
// TypeName returns a human readable name for the AST element type.
|
||||
func TypeName(x interface{}) string {
|
||||
func TypeName(x any) string {
|
||||
return v1.TypeName(x)
|
||||
}
|
||||
|
||||
+11
-11
@@ -30,7 +30,7 @@ func NewLocation(text []byte, file string, row int, col int) *Location {
|
||||
type Value = v1.Value
|
||||
|
||||
// InterfaceToValue converts a native Go value x to a Value.
|
||||
func InterfaceToValue(x interface{}) (Value, error) {
|
||||
func InterfaceToValue(x any) (Value, error) {
|
||||
return v1.InterfaceToValue(x)
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ func ValueFromReader(r io.Reader) (Value, error) {
|
||||
}
|
||||
|
||||
// As converts v into a Go native type referred to by x.
|
||||
func As(v Value, x interface{}) error {
|
||||
func As(v Value, x any) error {
|
||||
return v1.As(v, x)
|
||||
}
|
||||
|
||||
@@ -62,13 +62,13 @@ func IsUnknownValueErr(err error) bool {
|
||||
// ValueToInterface returns the Go representation of an AST value. The AST
|
||||
// value should not contain any values that require evaluation (e.g., vars,
|
||||
// comprehensions, etc.)
|
||||
func ValueToInterface(v Value, resolver Resolver) (interface{}, error) {
|
||||
func ValueToInterface(v Value, resolver Resolver) (any, error) {
|
||||
return v1.ValueToInterface(v, resolver)
|
||||
}
|
||||
|
||||
// JSON returns the JSON representation of v. The value must not contain any
|
||||
// refs or terms that require evaluation (e.g., vars, comprehensions, etc.)
|
||||
func JSON(v Value) (interface{}, error) {
|
||||
func JSON(v Value) (any, error) {
|
||||
return v1.JSON(v)
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ type JSONOpt = v1.JSONOpt
|
||||
|
||||
// JSONWithOpt returns the JSON representation of v. The value must not contain any
|
||||
// refs or terms that require evaluation (e.g., vars, comprehensions, etc.)
|
||||
func JSONWithOpt(v Value, opt JSONOpt) (interface{}, error) {
|
||||
func JSONWithOpt(v Value, opt JSONOpt) (any, error) {
|
||||
return v1.JSONWithOpt(v, opt)
|
||||
}
|
||||
|
||||
@@ -85,14 +85,14 @@ func JSONWithOpt(v Value, opt JSONOpt) (interface{}, error) {
|
||||
// refs or terms that require evaluation (e.g., vars, comprehensions, etc.) If
|
||||
// the conversion fails, this function will panic. This function is mostly for
|
||||
// test purposes.
|
||||
func MustJSON(v Value) interface{} {
|
||||
func MustJSON(v Value) any {
|
||||
return v1.MustJSON(v)
|
||||
}
|
||||
|
||||
// MustInterfaceToValue converts a native Go value x to a Value. If the
|
||||
// conversion fails, this function will panic. This function is mostly for test
|
||||
// purposes.
|
||||
func MustInterfaceToValue(x interface{}) Value {
|
||||
func MustInterfaceToValue(x any) Value {
|
||||
return v1.MustInterfaceToValue(x)
|
||||
}
|
||||
|
||||
@@ -115,17 +115,17 @@ func IsComprehension(x Value) bool {
|
||||
}
|
||||
|
||||
// ContainsRefs returns true if the Value v contains refs.
|
||||
func ContainsRefs(v interface{}) bool {
|
||||
func ContainsRefs(v any) bool {
|
||||
return v1.ContainsRefs(v)
|
||||
}
|
||||
|
||||
// ContainsComprehensions returns true if the Value v contains comprehensions.
|
||||
func ContainsComprehensions(v interface{}) bool {
|
||||
func ContainsComprehensions(v any) bool {
|
||||
return v1.ContainsComprehensions(v)
|
||||
}
|
||||
|
||||
// ContainsClosures returns true if the Value v contains closures.
|
||||
func ContainsClosures(v interface{}) bool {
|
||||
func ContainsClosures(v any) bool {
|
||||
return v1.ContainsClosures(v)
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ func ObjectTerm(o ...[2]*Term) *Term {
|
||||
return v1.ObjectTerm(o...)
|
||||
}
|
||||
|
||||
func LazyObject(blob map[string]interface{}) Object {
|
||||
func LazyObject(blob map[string]any) Object {
|
||||
return v1.LazyObject(blob)
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -16,22 +16,22 @@ type Transformer = v1.Transformer
|
||||
|
||||
// Transform iterates the AST and calls the Transform function on the
|
||||
// Transformer t for x before recursing.
|
||||
func Transform(t Transformer, x interface{}) (interface{}, error) {
|
||||
func Transform(t Transformer, x any) (any, error) {
|
||||
return v1.Transform(t, x)
|
||||
}
|
||||
|
||||
// TransformRefs calls the function f on all references under x.
|
||||
func TransformRefs(x interface{}, f func(Ref) (Value, error)) (interface{}, error) {
|
||||
func TransformRefs(x any, f func(Ref) (Value, error)) (any, error) {
|
||||
return v1.TransformRefs(x, f)
|
||||
}
|
||||
|
||||
// TransformVars calls the function f on all vars under x.
|
||||
func TransformVars(x interface{}, f func(Var) (Value, error)) (interface{}, error) {
|
||||
func TransformVars(x any, f func(Var) (Value, error)) (any, error) {
|
||||
return v1.TransformVars(x, f)
|
||||
}
|
||||
|
||||
// TransformComprehensions calls the functio nf on all comprehensions under x.
|
||||
func TransformComprehensions(x interface{}, f func(interface{}) (Value, error)) (interface{}, error) {
|
||||
func TransformComprehensions(x any, f func(any) (Value, error)) (any, error) {
|
||||
return v1.TransformComprehensions(x, f)
|
||||
}
|
||||
|
||||
@@ -41,6 +41,6 @@ type GenericTransformer = v1.GenericTransformer
|
||||
|
||||
// NewGenericTransformer returns a new GenericTransformer that will transform
|
||||
// AST nodes using the function f.
|
||||
func NewGenericTransformer(f func(x interface{}) (interface{}, error)) *GenericTransformer {
|
||||
func NewGenericTransformer(f func(x any) (any, error)) *GenericTransformer {
|
||||
return v1.NewGenericTransformer(f)
|
||||
}
|
||||
|
||||
+13
-13
@@ -21,68 +21,68 @@ type BeforeAndAfterVisitor = v1.BeforeAndAfterVisitor
|
||||
// Walk iterates the AST by calling the Visit function on the Visitor
|
||||
// v for x before recursing.
|
||||
// Deprecated: use GenericVisitor.Walk
|
||||
func Walk(v Visitor, x interface{}) {
|
||||
func Walk(v Visitor, x any) {
|
||||
v1.Walk(v, x)
|
||||
}
|
||||
|
||||
// WalkBeforeAndAfter iterates the AST by calling the Visit function on the
|
||||
// Visitor v for x before recursing.
|
||||
// Deprecated: use GenericVisitor.Walk
|
||||
func WalkBeforeAndAfter(v BeforeAndAfterVisitor, x interface{}) {
|
||||
func WalkBeforeAndAfter(v BeforeAndAfterVisitor, x any) {
|
||||
v1.WalkBeforeAndAfter(v, x)
|
||||
}
|
||||
|
||||
// WalkVars calls the function f on all vars under x. If the function f
|
||||
// returns true, AST nodes under the last node will not be visited.
|
||||
func WalkVars(x interface{}, f func(Var) bool) {
|
||||
func WalkVars(x any, f func(Var) bool) {
|
||||
v1.WalkVars(x, f)
|
||||
}
|
||||
|
||||
// WalkClosures calls the function f on all closures under x. If the function f
|
||||
// returns true, AST nodes under the last node will not be visited.
|
||||
func WalkClosures(x interface{}, f func(interface{}) bool) {
|
||||
func WalkClosures(x any, f func(any) bool) {
|
||||
v1.WalkClosures(x, f)
|
||||
}
|
||||
|
||||
// WalkRefs calls the function f on all references under x. If the function f
|
||||
// returns true, AST nodes under the last node will not be visited.
|
||||
func WalkRefs(x interface{}, f func(Ref) bool) {
|
||||
func WalkRefs(x any, f func(Ref) bool) {
|
||||
v1.WalkRefs(x, f)
|
||||
}
|
||||
|
||||
// WalkTerms calls the function f on all terms under x. If the function f
|
||||
// returns true, AST nodes under the last node will not be visited.
|
||||
func WalkTerms(x interface{}, f func(*Term) bool) {
|
||||
func WalkTerms(x any, f func(*Term) bool) {
|
||||
v1.WalkTerms(x, f)
|
||||
}
|
||||
|
||||
// WalkWiths calls the function f on all with modifiers under x. If the function f
|
||||
// returns true, AST nodes under the last node will not be visited.
|
||||
func WalkWiths(x interface{}, f func(*With) bool) {
|
||||
func WalkWiths(x any, f func(*With) bool) {
|
||||
v1.WalkWiths(x, f)
|
||||
}
|
||||
|
||||
// WalkExprs calls the function f on all expressions under x. If the function f
|
||||
// returns true, AST nodes under the last node will not be visited.
|
||||
func WalkExprs(x interface{}, f func(*Expr) bool) {
|
||||
func WalkExprs(x any, f func(*Expr) bool) {
|
||||
v1.WalkExprs(x, f)
|
||||
}
|
||||
|
||||
// WalkBodies calls the function f on all bodies under x. If the function f
|
||||
// returns true, AST nodes under the last node will not be visited.
|
||||
func WalkBodies(x interface{}, f func(Body) bool) {
|
||||
func WalkBodies(x any, f func(Body) bool) {
|
||||
v1.WalkBodies(x, f)
|
||||
}
|
||||
|
||||
// WalkRules calls the function f on all rules under x. If the function f
|
||||
// returns true, AST nodes under the last node will not be visited.
|
||||
func WalkRules(x interface{}, f func(*Rule) bool) {
|
||||
func WalkRules(x any, f func(*Rule) bool) {
|
||||
v1.WalkRules(x, f)
|
||||
}
|
||||
|
||||
// WalkNodes calls the function f on all nodes under x. If the function f
|
||||
// returns true, AST nodes under the last node will not be visited.
|
||||
func WalkNodes(x interface{}, f func(Node) bool) {
|
||||
func WalkNodes(x any, f func(Node) bool) {
|
||||
v1.WalkNodes(x, f)
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ type GenericVisitor = v1.GenericVisitor
|
||||
|
||||
// NewGenericVisitor returns a new GenericVisitor that will invoke the function
|
||||
// f on AST nodes.
|
||||
func NewGenericVisitor(f func(x interface{}) bool) *GenericVisitor {
|
||||
func NewGenericVisitor(f func(x any) bool) *GenericVisitor {
|
||||
return v1.NewGenericVisitor(f)
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ type BeforeAfterVisitor = v1.BeforeAfterVisitor
|
||||
|
||||
// NewBeforeAfterVisitor returns a new BeforeAndAfterVisitor that
|
||||
// will invoke the functions before and after AST nodes.
|
||||
func NewBeforeAfterVisitor(before func(x interface{}) bool, after func(x interface{})) *BeforeAfterVisitor {
|
||||
func NewBeforeAfterVisitor(before func(x any) bool, after func(x any)) *BeforeAfterVisitor {
|
||||
return v1.NewBeforeAfterVisitor(before, after)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user