Documentation ¶
Index ¶
- Constants
- func NewRangeServer(content io.ReadSeeker) *httptest.Server
- func NewServer(contentReader io.Reader) *httptest.Server
- func NewSimpleRangeServer() *httptest.Server
- func NewSimpleServer() *httptest.Server
- type RangeBuffer
- func (b *RangeBuffer) Grow(size int)
- func (b *RangeBuffer) Len() int
- func (b *RangeBuffer) Read(p []byte) (n int, err error)
- func (b *RangeBuffer) ReadAt(p []byte, off int64) (n int, err error)
- func (b *RangeBuffer) Seek(offset int64, whence int) (ret int64, err error)
- func (b *RangeBuffer) String() string
- func (b *RangeBuffer) WriteAt(p []byte, off int64) (n int, err error)
Constants ¶
View Source
const (
// DefaultWebContent stores "Hello World!" text content.
DefaultWebContent = "Hello World!"
)
Variables ¶
This section is empty.
Functions ¶
func NewRangeServer ¶
func NewRangeServer(content io.ReadSeeker) *httptest.Server
NewRangeServer creates a simple httptest.Server with an io.Reader for writing content.
func NewSimpleRangeServer ¶
NewSimpleRangeServer creates a simple httptest.Server serving 'Hello World!' content.
func NewSimpleServer ¶
NewSimpleServer create a simple httptest.Server serving 'Hello World!' content
Types ¶
type RangeBuffer ¶
RangeBuffer is an alternative for bytes.Buffer but implements io.Seeker and some other interface for range testing.
func (*RangeBuffer) Grow ¶
func (b *RangeBuffer) Grow(size int)
func (*RangeBuffer) Len ¶
func (b *RangeBuffer) Len() int
func (*RangeBuffer) Seek ¶
func (b *RangeBuffer) Seek(offset int64, whence int) (ret int64, err error)
func (*RangeBuffer) String ¶
func (b *RangeBuffer) String() string
Click to show internal directories.
Click to hide internal directories.