test

package
Version: v0.0.0-...-79cd42e Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterURLVarExtractor

func RegisterURLVarExtractor(fn parse.URLVarExtractor)

Types

type HandlerInfo

type HandlerInfo struct {
	FileName string
	FuncName string
}

type ResponseWriter

type ResponseWriter struct {
	HandlerInfo HandlerInfo
	URLVars     map[string]string
	W           *httptest.ResponseRecorder
}

func NewResponseWriter

func NewResponseWriter(w *httptest.ResponseRecorder) *ResponseWriter

func (*ResponseWriter) Header

func (rw *ResponseWriter) Header() http.Header

func (*ResponseWriter) Write

func (rw *ResponseWriter) Write(b []byte) (int, error)

func (*ResponseWriter) WriteHeader

func (rw *ResponseWriter) WriteHeader(c int)

type Server

type Server struct {
	*httptest.Server
	// contains filtered or unexported fields
}

func NewServer

func NewServer(handler http.Handler) (s *Server, err error)

TODO: filter out 404 responses

func (*Server) Finish

func (s *Server) Finish()

Jump to

Keyboard shortcuts

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