Make ResponseWriter an interface
Make ResponseWriter an interface with an unexported method. Implementors must embed a ResponseWriter from elsewhere. This gives us the flexibility of an interface while allowing us to add new methods in the future.
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
type nopHandler struct{}
|
||||
|
||||
func (*nopHandler) ServeGemini(context.Context, *ResponseWriter, *Request) {}
|
||||
func (*nopHandler) ServeGemini(context.Context, ResponseWriter, *Request) {}
|
||||
|
||||
func TestServeMuxMatch(t *testing.T) {
|
||||
type Match struct {
|
||||
|
||||
Reference in New Issue
Block a user