Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove "Chan" type #23

Merged
merged 2 commits into from
Aug 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 0 additions & 109 deletions chan.go

This file was deleted.

113 changes: 0 additions & 113 deletions chan_test.go

This file was deleted.

3 changes: 3 additions & 0 deletions limit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,7 @@ func TestLimitWriter(t *testing.T) {
t.Fatal("Expected to write 3 bytes with no errors")
}
err = writer.Flush()
if err != nil {
t.Fatal(err)
}
}
9 changes: 7 additions & 2 deletions msgio_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ import (
"time"
)

func randBuf(r *rand.Rand, size int) []byte {
buf := make([]byte, size)
_, _ = r.Read(buf)
return buf
}

func TestReadWrite(t *testing.T) {
buf := bytes.NewBuffer(nil)
writer := NewWriter(buf)
Expand Down Expand Up @@ -54,8 +60,7 @@ type testIoReadWriter struct {

func TestReadWriterClose(t *testing.T) {
r, w := io.Pipe()
var rw ReadWriteCloser
rw = NewReadWriter(testIoReadWriter{r, w})
rw := NewReadWriter(testIoReadWriter{r, w})
SubtestReaderWriterClose(t, rw)
}

Expand Down