File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 1
1
package sync
2
2
3
- import (
4
- "github.com/cschleiden/go-workflows/internal/converter"
5
- )
6
-
7
3
type Channel [T any ] interface {
8
4
Send (ctx Context , v T )
9
5
@@ -31,16 +27,14 @@ var _ ChannelInternal[struct{}] = (*channel[struct{}])(nil)
31
27
32
28
func NewChannel [T any ]() Channel [T ] {
33
29
return & channel [T ]{
34
- c : make ([]T , 0 ),
35
- converter : converter .DefaultConverter ,
30
+ c : make ([]T , 0 ),
36
31
}
37
32
}
38
33
39
34
func NewBufferedChannel [T any ](size int ) Channel [T ] {
40
35
return & channel [T ]{
41
- c : make ([]T , 0 , size ),
42
- size : size ,
43
- converter : converter .DefaultConverter ,
36
+ c : make ([]T , 0 , size ),
37
+ size : size ,
44
38
}
45
39
}
46
40
@@ -50,7 +44,6 @@ type channel[T any] struct {
50
44
senders []func () T
51
45
closed bool
52
46
size int
53
- converter converter.Converter
54
47
}
55
48
56
49
func (c * channel [T ]) Close () {
You can’t perform that action at this time.
0 commit comments