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

Extract pkg/stream from Empire. #26

Merged
merged 1 commit into from Nov 25, 2015
Merged

Extract pkg/stream from Empire. #26

merged 1 commit into from Nov 25, 2015

Conversation

ejholmes
Copy link
Contributor

This extracts pkg/stream from Empire, which provides some utility for doing streaming io with http.

@benguillet
Copy link

👍

ejholmes added a commit that referenced this pull request Nov 25, 2015
Extract pkg/stream from Empire.
@ejholmes ejholmes merged commit 08031f3 into master Nov 25, 2015
@ejholmes ejholmes deleted the stream branch November 25, 2015 01:50
// streaming. If the provided ResponseWriter does not implement http.Flusher,
// this function will panic.
func StreamingResponseWriter(w http.ResponseWriter) *ResponseWriter {
fw, err := newFlushWriter(w)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use composed interface instead? i.e.

type FlushingResponseWriter interface {
    http.ResponseWriter
    http.Flusher
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants