writer

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

package writer represents a Test ResponseWriter for use in Unit Tests

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWriter

func NewWriter() http.ResponseWriter

Types

type TestResponseWriter

type TestResponseWriter struct {
	Headers    http.Header
	StatusCode int
	Bytes      []byte
}

func (*TestResponseWriter) Header

func (w *TestResponseWriter) Header() http.Header

func (*TestResponseWriter) Reset

func (w *TestResponseWriter) Reset()

func (*TestResponseWriter) Write

func (w *TestResponseWriter) Write(b []byte) (int, error)

func (*TestResponseWriter) WriteHeader

func (w *TestResponseWriter) WriteHeader(statusCode int)

Jump to

Keyboard shortcuts

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