Skip to content

Instantly share code, notes, and snippets.

@b0o b0o/main.go
Created Sep 26, 2018

Embed
What would you like to do?
for {
buf := make([]byte, 1024*4)
n, err := res.Body.Read(buf)
if err == io.EOF {
break
}
cbuf <- buf[:n]
select {
case <-cquit:
err = fmt.Errorf("force quit")
break
default:
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.