fugue / fregot

Fugue Rego Toolkit
Apache License 2.0
234 stars 11 forks source link

no 'array.slice' builtin #222

Closed srenatus closed 4 years ago

srenatus commented 4 years ago

There might be others, I haven't checked. Just stumbled here:

$ cat slice.rego
package s

arr := ["foo", "bar", "baz"]
x := array.slice(arr, 0, 1)
$ opa eval -d slice.rego data.s.x --format=pretty
[
  "foo"
]
$ fregot eval data.s.x slice.rego
fregot (renamer error):
  "slice.rego" (line 4, column 6):
  unknown function:

    4| x := array.slice(arr, 0, 1)
            ^^^^^^^^^^^^^^^^^^^^^^

  Package array is not imported.
$
srenatus commented 4 years ago

⏩ #224