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) { server.HandleFunc("example.org", func(w *gmi.ResponseWriter, r *gmi.Request) {
fmt.Fprint(w, "Welcome to example.org") fmt.Fprint(w, "Welcome to example.org")
}) })
server.HandleSchemeFunc("http", "example.net", func(w *gmi.ResponseWriter, r *gmi.Request) { server.HandleFunc("http://example.net", func(w *gmi.ResponseWriter, r *gmi.Request) {
fmt.Fprint(w, "Proxied content from example.net") fmt.Fprint(w, "Proxied content from http://example.net")
}) })
To start the server, call ListenAndServe: To start the server, call ListenAndServe: