server: Rename Register to Handle

This commit is contained in:
Adnan Maolood
2021-01-14 22:12:07 -05:00
parent 4b643523fb
commit 06c53cc5b1
4 changed files with 9 additions and 9 deletions

View File

@@ -42,7 +42,7 @@ func main() {
Duration: time.Hour,
})
}
server.Register("localhost", &mux)
server.Handle("localhost", &mux)
if err := server.ListenAndServe(); err != nil {
log.Fatal(err)

View File

@@ -34,7 +34,7 @@ func main() {
var mux gemini.ServeMux
mux.Handle("/", gemini.FileServer(gemini.Dir("/var/www")))
server.Register("localhost", &mux)
server.Handle("localhost", &mux)
if err := server.ListenAndServe(); err != nil {
log.Fatal(err)
}

View File

@@ -31,7 +31,7 @@ func main() {
})
}
server.RegisterFunc("localhost", stream)
server.HandleFunc("localhost", stream)
if err := server.ListenAndServe(); err != nil {
log.Fatal(err)
}