Documentation
¶
Index ¶
- Variables
- func NewCheckRegistry() *checkRegistry
- type Checker
- type Message
- func Critical(ID, text string, object any, hint ...string) Message
- func Criticalf(ID, text string, object any, hint string, args ...any) Message
- func Debug(ID, text string, object any, hint ...string) Message
- func Debugf(ID, text string, object any, hint string, args ...any) Message
- func Error(ID, text string, object any, hint ...string) Message
- func Errorf(ID, text string, object any, hint string, args ...any) Message
- func Info(ID, text string, object any, hint ...string) Message
- func Infof(ID, text string, object any, hint string, args ...any) Message
- func Warning(ID, text string, object any, hint ...string) Message
- func Warningf(ID, text string, object any, hint string, args ...any) Message
- type Tag
- type Type
- type TypeStringer
- type USELESS
Constants ¶
This section is empty.
Variables ¶
var ( Register = registry.Register RunCheck = registry.RunCheck Shutup = registry.Shutup HasTag = registry.HasTag )
Functions ¶
func NewCheckRegistry ¶
func NewCheckRegistry() *checkRegistry
Types ¶
type Message ¶
func (Message) Is ¶
Is checks if the message is of the same type and ID as another message.
It is used to compare messages for equality, ignoring the text and object fields.
It should still compare as true when it is compared to a message called with Message.New().
func (Message) IsSerious ¶
IsSerious checks if the message is of a serious type (ERROR or higher). It is used to determine if the message should be treated as a serious issue
If, for any reason, the seriousness comparison needs to be changed, it can be done by changing the value of SERIOUS_TYPE.
func (Message) New ¶
New creates a new message with the same ID and type as the original message,
but with a new object and an optional hint.
It is used to create a new message with the same ID and type as an existing message, but with a different object and/or hint.
This is useful when you want to create global messages that can be reused with different objects or hints, while still keeping the same ID and type.
Any Message created with this method will still compare as equal when calling Message.Is.
type TypeStringer ¶
type TypeStringer interface {
TypeString() string
}