File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ type Result struct {
2727 Package string
2828}
2929
30- // IsSuccessState returns true if Value is boolean and it is true.
30+ // IsSuccessState returns true if there are no Violations
31+ // If Violations are missing, the Value is parsed and if it is a bool that is used, otherwise false
3132func (r * Result ) IsSuccessState () bool {
3233 if r .Violations != nil {
3334 return len (r .Violations ) == 0
@@ -42,7 +43,8 @@ func (r *Result) IsSuccessState() bool {
4243 }
4344}
4445
45- // IsFailureState returns true if Value is boolean and it is false.
46+ // IsFailureState returns true if there are Violations
47+ // If Violations are missing, the Value is parsed and if it is a bool that is negated and returned, otherwise false
4648func (r * Result ) IsFailureState () bool {
4749 if r .Violations != nil {
4850 return len (r .Violations ) != 0
You can’t perform that action at this time.
0 commit comments