1
0
Fork 0
mirror of https://git.sr.ht/~adnano/go-gemini synced 2024-05-13 15:36:05 +02:00

Update documentation

This commit is contained in:
Adnan Maolood 2020-10-21 15:57:04 -04:00
parent 376c602748
commit e8fac2e6ed

4
doc.go
View File

@ -70,8 +70,8 @@ Servers can accept requests for multiple hosts and schemes:
server.HandleFunc("example.org", func(w *gmi.ResponseWriter, r *gmi.Request) {
fmt.Fprint(w, "Welcome to example.org")
})
server.HandleSchemeFunc("http", "example.net", func(w *gmi.ResponseWriter, r *gmi.Request) {
fmt.Fprint(w, "Proxied content from example.net")
server.HandleFunc("http://example.net", func(w *gmi.ResponseWriter, r *gmi.Request) {
fmt.Fprint(w, "Proxied content from http://example.net")
})
To start the server, call ListenAndServe: