reports

package
v0.0.0-...-0c5530c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorLevel

type ErrorLevel int
const (
	ErrorLevelInfo ErrorLevel = iota + 1
	ErrorLevelWarning
	ErrorLevelError
)

func (ErrorLevel) String

func (el ErrorLevel) String() string

type Report

type Report struct {
	Level    ErrorLevel
	Rule     string
	Location string
	Message  string
}

func NewReport

func NewReport(
	level ErrorLevel,
	rule string,
	location string,
	format string,
	args ...any,
) *Report

func (*Report) IsError

func (r *Report) IsError() bool

func (*Report) IsWarning

func (r *Report) IsWarning() bool

func (*Report) String

func (r *Report) String() string

type ReportList

type ReportList []*Report

func (ReportList) CountErrors

func (rl ReportList) CountErrors() int

func (ReportList) CountWarnings

func (rl ReportList) CountWarnings() int

func (ReportList) String

func (rl ReportList) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL