Documentation ¶
Overview ¶
Package validate provides validation logic for checking over a local knowledge base.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFilenameValidator ¶
func NewFilenameValidator() filenameValidator
NewFilenameValidator returns a filenameValidator type.
Types ¶
type Error ¶
type Error uint8
Error allows for sentinel errors via enums.
const ( // ErrFailedRegexMatch is a sentinel error for when the check fails due to // regexp.MatchString returning an error, commonly caused by an invalid regex // pattern. ErrFailedRegexMatch Error = iota // ErrInsufficientNumberOfFilenameParts is a sentinel error for when the check // fails due to the filename not having at least one part. ErrInsufficientNumberOfFilenameParts // ErrInvalidFilenameFormat is a sentinel error for when the check fails due // to a note filename using the incorrect format. ErrInvalidFilenameFormat // ErrMissingMarkdownFileExtension is a sentinel error for when the check // fails due to the filename not ending with the ".md" markdown file // extension. ErrMissingMarkdownFileExtension // ErrUnrecognisedBaseSchemaType is a sentinel error for when the check fails // due to the filename using a base schema type which is not valid/known. ErrUnrecognisedBaseSchemaType )
Click to show internal directories.
Click to hide internal directories.