htmllimits

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrImageTooLarge      = errors.New("html: image exceeds configured limits")
	ErrDOMTooDeep         = errors.New("html: DOM exceeds configured depth limit")
	ErrDOMTooLarge        = errors.New("html: DOM exceeds configured node limit")
	ErrSVGTooLarge        = errors.New("html: SVG raster dimensions exceed configured pixel limit")
	ErrStyleRulesTooLarge = errors.New("html: stylesheet exceeds configured rule limit")
)

Functions

func Int64Exceeded

func Int64Exceeded(limit, value int64) bool

func IntExceeded

func IntExceeded(limit, value int) bool

Types

type Limits

type Limits struct {
	MaxImagePixels int64
	MaxImageBytes  int64
	MaxDOMDepth    int
	MaxDOMNodes    int
	MaxSVGPixels   int64
	MaxStyleRules  int
}

func Default

func Default() Limits

func NoLimits

func NoLimits() Limits

func Normalize

func Normalize(l Limits) Limits

Jump to

Keyboard shortcuts

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