validator

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Problem

type Problem struct {
	Severity Severity
	Message  string
}

Problem a problem detected during validation Must have a severity and an associated message TODO: include element position once available in the AST.

func Validate

func Validate(doc *types.Document, doctype string) ([]Problem, error)

Validate validates the given document May also alter some attributes (eg: doctype from `manpage` to `article`)

type Severity

type Severity string

Severity the problem severity

const (
	// Error the severity level for errors.
	Error Severity = "Error"
	// Warning the severity level for warning
	Warning Severity = "Warning"
)

Jump to

Keyboard shortcuts

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