mockwriter

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockWriter

type MockWriter struct {
	// contains filtered or unexported fields
}

func NewMockWriter

func NewMockWriter(t WriterType) *MockWriter

func (*MockWriter) SetSpecificType

func (w *MockWriter) SetSpecificType(ts map[uint32]WriterType)

为某些写操作指定特定的类型,次数从 0 开始计数

func (*MockWriter) Write

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

type WriterType

type WriterType uint8
const (
	WriterTypeDoNothing WriterType = iota
	WriterTypeReturnError
	WriterTypeIntoBuffer
)

Jump to

Keyboard shortcuts

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