Documentation ¶
Overview ¶
Package nntptest provides utilities for NNTP testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResponseRecorder ¶
type ResponseRecorder struct { Code int Body *bytes.Buffer // contains filtered or unexported fields }
ResponseRecorder is an implementation of nntp.ResponseWriter that records its mutations for later inspection in tests.
func NewRecorder ¶
func NewRecorder() *ResponseRecorder
NewRecorder returns an initialized ResponseRecorder.
func (*ResponseRecorder) Write ¶
func (rw *ResponseRecorder) Write(buf []byte) (int, error)
Write always succeeds and writes to rw.Body, if not nil.
func (*ResponseRecorder) WriteHeader ¶
func (rw *ResponseRecorder) WriteHeader(code int)
WriteHeader sets rw.Code.
Click to show internal directories.
Click to hide internal directories.