fixture

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Body

func Body(body []byte, contentType string) http.HandlerFunc

func Charset

func Charset(label string, body []byte) http.HandlerFunc

func Delay

func Delay(d time.Duration, inner http.Handler) http.HandlerFunc

func Headers

func Headers(h http.Header, inner http.Handler) http.HandlerFunc

func Redirect

func Redirect(location string, code int) http.HandlerFunc

func Status

func Status(code int) http.HandlerFunc

Types

type Server

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

func MultiPageSite added in v0.2.0

func MultiPageSite() *Server

func New

func New() *Server

func (*Server) Close

func (s *Server) Close()

func (*Server) Route

func (s *Server) Route(method, path string, h http.HandlerFunc) *Server

func (*Server) URL

func (s *Server) URL() string

Jump to

Keyboard shortcuts

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