aboutsummaryrefslogtreecommitdiff
path: root/handler.go
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2021-02-23 19:01:10 -0500
committerAdnan Maolood <[email protected]>2021-02-23 19:01:12 -0500
commit64f9381bbc3a288ac2dfce253be64b4467abad2e (patch)
treea782565fef879bcc630fe31a11e2969df3317709 /handler.go
parenthandler: Mention ResponseWriter.Close method (diff)
downloadgo-gemini-64f9381bbc3a288ac2dfce253be64b4467abad2e.tar.xz
go-gemini-64f9381bbc3a288ac2dfce253be64b4467abad2e.zip
handler: Mention when the context is canceled
Diffstat (limited to 'handler.go')
-rw-r--r--handler.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/handler.go b/handler.go
index afa71ba..c8cd13f 100644
--- a/handler.go
+++ b/handler.go
@@ -14,6 +14,9 @@ import (
// of the ServeGemini call. Handlers may also call ResponseWriter.Close to
// manually close the connection.
//
+// The provided context is canceled when the client's connection is closed,
+// when ResponseWriter.Close is called, or when the ServeGemini method returns.
+//
// Handlers should not modify the provided Request.
type Handler interface {
ServeGemini(context.Context, ResponseWriter, *Request)