aboutsummaryrefslogtreecommitdiff
path: root/response.go
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2021-02-24 19:00:09 -0500
committerAdnan Maolood <[email protected]>2021-02-24 19:00:09 -0500
commit1764e02d1e057139f00a5483a4a2ffa47c9a3079 (patch)
tree94870524cd00fdad3033149378f22a7ae666da8c /response.go
parentresponse: Revert to using fields instead of methods (diff)
downloadgo-gemini-1764e02d1e057139f00a5483a4a2ffa47c9a3079.tar.xz
go-gemini-1764e02d1e057139f00a5483a4a2ffa47c9a3079.zip
Remove ResponseWriter.Close method
Diffstat (limited to 'response.go')
-rw-r--r--response.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/response.go b/response.go
index 076b3fa..5c7d7b3 100644
--- a/response.go
+++ b/response.go
@@ -147,10 +147,6 @@ type ResponseWriter interface {
// Flush sends any buffered data to the client.
Flush() error
-
- // Close closes the connection.
- // Any blocked Write operations will be unblocked and return errors.
- Close() error
}
type responseWriter struct {
@@ -161,10 +157,9 @@ type responseWriter struct {
bodyAllowed bool
}
-func newResponseWriter(w io.WriteCloser) *responseWriter {
+func newResponseWriter(w io.Writer) *responseWriter {
return &responseWriter{
bw: bufio.NewWriter(w),
- cl: w,
}
}
@@ -210,7 +205,3 @@ func (w *responseWriter) Flush() error {
// Write errors from WriteHeader will be returned here.
return w.bw.Flush()
}
-
-func (w *responseWriter) Close() error {
- return w.cl.Close()
-}