error_pages

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorPages

type ErrorPages struct {
	// contains filtered or unexported fields
}

ErrorPages stores the custom error pages and is called by the servers to output meaningful pages for HTTP error codes

func New

func New(dir fs.FS) *ErrorPages

New creates a new error pages generator

func (*ErrorPages) Compile

func (e *ErrorPages) Compile()

Compile loads the error pages the certificates and keys from the directories.

This method makes use of the rescheduler instead of just ignoring multiple calls.

func (*ErrorPages) ServeError

func (e *ErrorPages) ServeError(rw http.ResponseWriter, code int)

ServeError writes the error page for the given code to the response writer

Jump to

Keyboard shortcuts

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