Skip to content

Commit

Permalink
rego: Fix godoc for rego.Rego() API
Browse files Browse the repository at this point in the history
The documentation was updated part way through adding the Prepare
helpers on the Rego object. Later on when PrepareForEval and
PrepareForPartial helpers were added and we stopped re-using
PartialResult this was left behind and is now incorrect.

Fixes: open-policy-agent#1619
Signed-off-by: Patrick East <east.patrick@gmail.com>
  • Loading branch information
patrick-east authored and tsandall committed Aug 14, 2019
1 parent ebb419b commit 8c80051
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions rego/rego.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ type PartialResult struct {
}

// Rego returns an object that can be evaluated to produce a query result.
// If rego.Rego#Prepare was used to create the PartialResult this may lose
// the pre-parsed/compiled parts of the original Rego object. In those cases
// using rego.PartialResult#Eval is likely to be more performant.
func (pr PartialResult) Rego(options ...func(*Rego)) *Rego {
options = append(options, Compiler(pr.compiler), Store(pr.store), ParsedQuery(pr.body))
return New(options...)
Expand Down

0 comments on commit 8c80051

Please sign in to comment.