31 lines
410 B
Go
31 lines
410 B
Go
package issue
|
|
|
|
const (
|
|
FATAL IssueLevel = "FATAL"
|
|
WARNING IssueLevel = "WARNING"
|
|
PASSED IssueLevel = "PASSED"
|
|
)
|
|
|
|
type IssueLevel string
|
|
|
|
type Issue struct {
|
|
Level IssueLevel
|
|
Safe bool
|
|
Messages []string
|
|
}
|
|
|
|
func (i *Issue) Passed() {
|
|
i.Level = PASSED
|
|
i.Safe = true
|
|
}
|
|
|
|
func (i *Issue) Warning() {
|
|
i.Level = WARNING
|
|
i.Safe = true
|
|
}
|
|
|
|
func (i *Issue) Fatal() {
|
|
i.Level = FATAL
|
|
i.Safe = false
|
|
}
|