servtatic

package
v0.0.0-...-4198252 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler parses all layout files with each body file creating templates that are ready to be served to the user.

func NewHandler

func NewHandler(layoutDir string, contentDir string, layout string) Handler

NewHandler creates a new servtatic handler for serving http

func (Handler) HandleError

func (h Handler) HandleError(w http.ResponseWriter, r *http.Request, errCode int)

HandleError handles errors

func (Handler) ServeHTTP

func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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