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:
+2
-5
@@ -16,10 +16,7 @@ import (
|
||||
// ParseDataPath returns a ref from the slash separated path s rooted at data.
|
||||
// All path segments are treated as identifier strings.
|
||||
func ParseDataPath(s string) (ast.Ref, error) {
|
||||
|
||||
s = "/" + strings.TrimPrefix(s, "/")
|
||||
|
||||
path, ok := storage.ParsePath(s)
|
||||
path, ok := storage.ParsePath("/" + strings.TrimPrefix(s, "/"))
|
||||
if !ok {
|
||||
return nil, errors.New("invalid path")
|
||||
}
|
||||
@@ -29,7 +26,7 @@ func ParseDataPath(s string) (ast.Ref, error) {
|
||||
|
||||
// ArrayPath will take an ast.Array and build an ast.Ref using the ast.Terms in the Array
|
||||
func ArrayPath(a *ast.Array) ast.Ref {
|
||||
var ref ast.Ref
|
||||
ref := make(ast.Ref, 0, a.Len())
|
||||
|
||||
a.Foreach(func(term *ast.Term) {
|
||||
ref = append(ref, term)
|
||||
|
||||
Reference in New Issue
Block a user