Make ResponseWriter a struct

Make ResponseWriter a struct again so that it can be extended in a
backwards-compatible way.
This commit is contained in:
Adnan Maolood
2021-02-23 20:40:22 -05:00
parent 64f9381bbc
commit a65c3c3d4f
7 changed files with 49 additions and 63 deletions

2
mux.go
View File

@@ -212,7 +212,7 @@ func (mux *ServeMux) Handler(r *Request) Handler {
// ServeGemini dispatches the request to the handler whose
// pattern most closely matches the request URL.
func (mux *ServeMux) ServeGemini(ctx context.Context, w ResponseWriter, r *Request) {
func (mux *ServeMux) ServeGemini(ctx context.Context, w *ResponseWriter, r *Request) {
h := mux.Handler(r)
h.ServeGemini(ctx, w, r)
}