forked from v2fly/v2ray-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
io.go
86 lines (72 loc) · 2.18 KB
/
io.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
// Code generated by MockGen. DO NOT EDIT.
// Source: io (interfaces: Reader,Writer)
// Package mocks is a generated GoMock package.
package mocks
import (
gomock "github.com/golang/mock/gomock"
reflect "reflect"
)
// Reader is a mock of Reader interface
type Reader struct {
ctrl *gomock.Controller
recorder *ReaderMockRecorder
}
// ReaderMockRecorder is the mock recorder for Reader
type ReaderMockRecorder struct {
mock *Reader
}
// NewReader creates a new mock instance
func NewReader(ctrl *gomock.Controller) *Reader {
mock := &Reader{ctrl: ctrl}
mock.recorder = &ReaderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *Reader) EXPECT() *ReaderMockRecorder {
return m.recorder
}
// Read mocks base method
func (m *Reader) Read(arg0 []byte) (int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Read", arg0)
ret0, _ := ret[0].(int)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Read indicates an expected call of Read
func (mr *ReaderMockRecorder) Read(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Read", reflect.TypeOf((*Reader)(nil).Read), arg0)
}
// Writer is a mock of Writer interface
type Writer struct {
ctrl *gomock.Controller
recorder *WriterMockRecorder
}
// WriterMockRecorder is the mock recorder for Writer
type WriterMockRecorder struct {
mock *Writer
}
// NewWriter creates a new mock instance
func NewWriter(ctrl *gomock.Controller) *Writer {
mock := &Writer{ctrl: ctrl}
mock.recorder = &WriterMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use
func (m *Writer) EXPECT() *WriterMockRecorder {
return m.recorder
}
// Write mocks base method
func (m *Writer) Write(arg0 []byte) (int, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Write", arg0)
ret0, _ := ret[0].(int)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Write indicates an expected call of Write
func (mr *WriterMockRecorder) Write(arg0 interface{}) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Write", reflect.TypeOf((*Writer)(nil).Write), arg0)
}