Documentation ¶
Index ¶
- type Result
- func (vr *Result) AddErrors(err ...string)
- func (vr *Result) AddGroupError(groupName string, reason string)
- func (vr *Result) AddGroupWarning(groupName string, reason string)
- func (vr *Result) AddParamError(paramName string, reason string)
- func (vr *Result) AddParamWarning(paramName string, reason string)
- func (vr *Result) AddWarnings(wrn ...string)
- func (vr *Result) ErrorsAsString() string
- func (vr *Result) ForOutput() ResultForOutput
- func (vr *Result) IsEmpty() bool
- func (vr *Result) IsValid() bool
- func (vr *Result) Merge(other Result)
- func (vr *Result) PrintErrors(out io.Writer)
- func (vr *Result) PrintWarnings(out io.Writer)
- type ResultForOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Result ¶
Result holds the errors and warnings of a package verification
func NewWarning ¶
func (*Result) AddGroupError ¶ added in v0.17.0
func (*Result) AddGroupWarning ¶ added in v0.18.0
func (*Result) AddParamError ¶
AddParamError adds a formatted error string for a package parameter error
func (*Result) AddParamWarning ¶
AddParamWarning adds a formatted warning string for a package parameter error
func (*Result) AddWarnings ¶
AddWarnings adds an arbitrary warning string to the verification result
func (*Result) ErrorsAsString ¶
ErrorsAsString returns all errors as a single string
func (*Result) ForOutput ¶ added in v0.16.0
func (vr *Result) ForOutput() ResultForOutput
func (*Result) PrintErrors ¶
PrintErrors is a pretty printer for verification errors
func (*Result) PrintWarnings ¶
PrintWarnings is a pretty printer for verification warnings
type ResultForOutput ¶ added in v0.16.0
type ResultForOutput struct { Errors []string `json:"errors"` Warnings []string `json:"warnings"` Valid bool `json:"valid"` }
ResultForOutput provides a serialization format for yaml/json output of a result
Click to show internal directories.
Click to hide internal directories.