Skip to content

Commit af6d061

Browse files
committed
Document fields in Result
Signed-off-by: Charlie Egan <[email protected]>
1 parent 489f2c6 commit af6d061

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pkg/results/results.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,14 @@ type outputResult map[string][]string
1717

1818
// Result holds the information about the result of a check
1919
type Result struct {
20-
ID string
20+
// ID is the identifier for the rule of this result.
21+
ID string
22+
// Violations contains a list of each violation for the rule from the OPA evaluator
2123
Violations []string
22-
Value interface{} // deprecated
23-
Package string
24+
// Deprecated: Value contains the raw result of the rule from the OPA evaluator.
25+
Value interface{}
26+
// Package references the package the rule belongs to.
27+
Package string
2428
}
2529

2630
// IsSuccessState returns true if Value is boolean and it is true.

0 commit comments

Comments
 (0)