aboutsummaryrefslogtreecommitdiff
path: root/doc.go
diff options
context:
space:
mode:
authoradnano <[email protected]>2020-10-13 20:22:12 -0400
committeradnano <[email protected]>2020-10-13 20:22:12 -0400
commitfaf94d8ba584d8cd3b56fee9bab4cce44c575d28 (patch)
treedb8e1c3130ea0a5214d91abe0b52a49acf8bd40a /doc.go
parentRename gemini.go to gmi.go (diff)
downloadgo-gemini-faf94d8ba584d8cd3b56fee9bab4cce44c575d28.tar.xz
go-gemini-faf94d8ba584d8cd3b56fee9bab4cce44c575d28.zip
Rename rw, req to w, r
Diffstat (limited to 'doc.go')
-rw-r--r--doc.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/doc.go b/doc.go
index 424a3c1..22398f7 100644
--- a/doc.go
+++ b/doc.go
@@ -64,14 +64,14 @@ Servers must be configured with certificates:
Servers can accept requests for multiple hosts and schemes:
- server.HandleFunc("example.com", func(rw *gmi.ResponseWriter, req *gmi.Request) {
- fmt.Fprint(rw, "Welcome to example.com")
+ server.HandleFunc("example.com", func(w *gmi.ResponseWriter, r *gmi.Request) {
+ fmt.Fprint(w, "Welcome to example.com")
})
- server.HandleFunc("example.org", func(rw *gmi.ResponseWriter, req *gmi.Request) {
- fmt.Fprint(rw, "Welcome to example.org")
+ server.HandleFunc("example.org", func(w *gmi.ResponseWriter, r *gmi.Request) {
+ fmt.Fprint(w, "Welcome to example.org")
})
- server.HandleSchemeFunc("http", "example.net", func(rw *gmi.ResponseWriter, req *gmi.Request) {
- fmt.Fprint(rw, "Proxied content from example.net")
+ server.HandleSchemeFunc("http", "example.net", func(w *gmi.ResponseWriter, r *gmi.Request) {
+ fmt.Fprint(w, "Proxied content from example.net")
})
To start the server, call ListenAndServe: