testkit

package module
v0.0.0-...-2a8d99b Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2018 License: MIT Imports: 2 Imported by: 0

README

testkit

test toolkit for NovaKit

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyResponse

type DummyResponse struct {
	*bytes.Buffer
	StatusCode int
	// contains filtered or unexported fields
}

DummyResponse dummy http.ResponseWriter for testing purpose

func NewDummyResponse

func NewDummyResponse() *DummyResponse

NewDummyResponse create a dummy response

func (*DummyResponse) Header

func (d *DummyResponse) Header() http.Header

Header implements http.ResponseWriter

func (*DummyResponse) Write

func (d *DummyResponse) Write(p []byte) (int, error)

Write override Buffer.Write with StatusCode setup

func (*DummyResponse) WriteHeader

func (d *DummyResponse) WriteHeader(statusCode int)

WriteHeader implements http.ResponseWriter

Jump to

Keyboard shortcuts

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