16 lines
175 B
Go
16 lines
175 B
Go
|
package channel
|
||
|
|
||
|
type Int chan int
|
||
|
|
||
|
func NewInt() Int {
|
||
|
return make(Int)
|
||
|
}
|
||
|
|
||
|
func NewBufferInt(size int) Int {
|
||
|
return make(Int, size)
|
||
|
}
|
||
|
|
||
|
func (c Int) Send(i int) {
|
||
|
c <- i
|
||
|
}
|