mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
Various style fixes
Submitting some miscellaneous changes I had locally. A few allocs saved, but mostly style fixes here, like simplifying known var/var equality using `==` and so on. Nothing controversial, or so I'd like to think :) Signed-off-by: Anders Eknert <anders.eknert@apple.com>
This commit is contained in:
committed by
Stephan Renatus
parent
cf1d96ab49
commit
64b079dea9
@@ -148,7 +148,7 @@ func ShortsFromMappings(mappings map[string]any) Set[string] {
|
||||
// number of rules present on the compiler. It should be used only for
|
||||
// error messages.
|
||||
func FuzzyRuleNameMatchHint(comp *ast.Compiler, input string) string {
|
||||
rules := comp.GetRules(ast.Ref{ast.DefaultRootDocument})
|
||||
rules := comp.GetRules(ast.DefaultRootRef)
|
||||
ruleNames := make([]string, 0, len(rules))
|
||||
for _, rule := range rules {
|
||||
if rule.Default {
|
||||
|
||||
Reference in New Issue
Block a user