/
writer.go
78 lines (60 loc) · 1.61 KB
/
writer.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
// Code generated by mockery v1.0.1. DO NOT EDIT.
package mocks
import (
context "context"
mock "github.com/stretchr/testify/mock"
)
// writer is an autogenerated mock type for the writer type
type writer struct {
mock.Mock
}
type writer_Flush struct {
*mock.Call
}
func (_m writer_Flush) Return(_a0 error) *writer_Flush {
return &writer_Flush{Call: _m.Call.Return(_a0)}
}
func (_m *writer) OnFlush() *writer_Flush {
c_call := _m.On("Flush")
return &writer_Flush{Call: c_call}
}
func (_m *writer) OnFlushMatch(matchers ...interface{}) *writer_Flush {
c_call := _m.On("Flush", matchers...)
return &writer_Flush{Call: c_call}
}
// Flush provides a mock function with given fields:
func (_m *writer) Flush() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
type writer_Write struct {
*mock.Call
}
func (_m writer_Write) Return(_a0 error) *writer_Write {
return &writer_Write{Call: _m.Call.Return(_a0)}
}
func (_m *writer) OnWrite(ctx context.Context, content string) *writer_Write {
c_call := _m.On("Write", ctx, content)
return &writer_Write{Call: c_call}
}
func (_m *writer) OnWriteMatch(matchers ...interface{}) *writer_Write {
c_call := _m.On("Write", matchers...)
return &writer_Write{Call: c_call}
}
// Write provides a mock function with given fields: ctx, content
func (_m *writer) Write(ctx context.Context, content string) error {
ret := _m.Called(ctx, content)
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, string) error); ok {
r0 = rf(ctx, content)
} else {
r0 = ret.Error(0)
}
return r0
}