pkg/channel/int.go

16 lines
175 B
Go
Raw Permalink Normal View History

2023-09-18 15:51:20 +08:00
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
}