1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00

change annotations struct field name

This commit is contained in:
shivkumar dudhani 2019-07-23 13:59:48 -04:00
parent b38febe734
commit e54890585a

View file

@ -23,7 +23,7 @@ type Policy struct {
type Rule struct {
Status string `json:"status"`
Changes string `json:"changes,omitempty"` // TODO for mutation changes
Error string `json:"error,omitempty"`
Message string `json:"message,omitempty"`
}
func (p *Policy) getOverAllStatus() string {
@ -61,7 +61,7 @@ func getRules(rules []*pinfo.RuleInfo, ruleType pinfo.RuleType) map[string]Rule
rule := Rule{Status: getStatus(r.IsSuccessful())}
if !r.IsSuccessful() {
rule.Error = r.GetErrorString()
rule.Message = r.GetErrorString()
}
annrules[r.Name] = rule
}