File tree Expand file tree Collapse file tree 5 files changed +0
-58
lines changed Expand file tree Collapse file tree 5 files changed +0
-58
lines changed Original file line number Diff line number Diff line change 6
6
"sync"
7
7
8
8
"github.com/ipfs/go-ipfs-cmdkit"
9
- "github.com/ipfs/go-ipfs-cmds/debug"
10
9
)
11
10
12
11
func NewChanResponsePair (req * Request ) (ResponseEmitter , Response ) {
@@ -130,12 +129,6 @@ func (re *chanResponseEmitter) Emit(v interface{}) error {
130
129
re .wl .Lock ()
131
130
defer re .wl .Unlock ()
132
131
133
- // Initially this library allowed commands to return errors by sending an
134
- // error value along a stream. We removed that in favour of CloseWithError,
135
- // so we want to make sure we catch situations where some code still uses the
136
- // old error emitting semantics and _panic_ in those situations.
137
- debug .AssertNotError (v )
138
-
139
132
// unblock Length()
140
133
select {
141
134
case <- re .waitLen :
Original file line number Diff line number Diff line change 9
9
"syscall"
10
10
11
11
"github.com/ipfs/go-ipfs-cmds"
12
- "github.com/ipfs/go-ipfs-cmds/debug"
13
12
)
14
13
15
14
var _ ResponseEmitter = & responseEmitter {}
@@ -137,12 +136,6 @@ func (re *responseEmitter) Emit(v interface{}) error {
137
136
isSingle = true
138
137
}
139
138
140
- // Initially this library allowed commands to return errors by sending an
141
- // error value along a stream. We removed that in favour of CloseWithError,
142
- // so we want to make sure we catch situations where some code still uses the
143
- // old error emitting semantics and _panic_ in those situations.
144
- debug .AssertNotError (v )
145
-
146
139
// channel emission iteration
147
140
if ch , ok := v .(chan interface {}); ok {
148
141
v = (<- chan interface {})(ch )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import (
10
10
11
11
"github.com/ipfs/go-ipfs-cmdkit"
12
12
cmds "github.com/ipfs/go-ipfs-cmds"
13
- "github.com/ipfs/go-ipfs-cmds/debug"
14
13
)
15
14
16
15
var (
@@ -88,12 +87,6 @@ type responseEmitter struct {
88
87
}
89
88
90
89
func (re * responseEmitter ) Emit (value interface {}) error {
91
- // Initially this library allowed commands to return errors by sending an
92
- // error value along a stream. We removed that in favour of CloseWithError,
93
- // so we want to make sure we catch situations where some code still uses the
94
- // old error emitting semantics and _panic_ in those situations.
95
- debug .AssertNotError (value )
96
-
97
90
// if we got a channel, instead emit values received on there.
98
91
if ch , ok := value .(chan interface {}); ok {
99
92
value = (<- chan interface {})(ch )
Original file line number Diff line number Diff line change 8
8
"sync"
9
9
10
10
"github.com/ipfs/go-ipfs-cmdkit"
11
- "github.com/ipfs/go-ipfs-cmds/debug"
12
11
)
13
12
14
13
func NewWriterResponseEmitter (w io.WriteCloser , req * Request ) (ResponseEmitter , error ) {
@@ -154,14 +153,6 @@ func (re *writerResponseEmitter) Emit(v interface{}) error {
154
153
return EmitChan (re , ch )
155
154
}
156
155
157
- // Initially this library allowed commands to return errors by sending an
158
- // error value along a stream. We removed that in favour of CloseWithError,
159
- // so we want to make sure we catch situations where some code still uses the
160
- // old error emitting semantics.
161
- // Also errors may occur both as pointers and as plain values, so we need to
162
- // check both.
163
- debug .AssertNotError (v )
164
-
165
156
if re .closed {
166
157
return ErrClosedEmitter
167
158
}
You can’t perform that action at this time.
0 commit comments