examples/server: Use os.DirFS

This commit is contained in:
Adnan Maolood 2021-02-17 09:25:44 -05:00
parent 2e5569d5b5
commit 246b252fd7

View File

@ -8,6 +8,7 @@ import (
"crypto/tls"
"crypto/x509/pkix"
"log"
"os"
"time"
"git.sr.ht/~adnano/go-gemini"
@ -32,7 +33,7 @@ func main() {
}
var mux gemini.ServeMux
mux.Handle("/", gemini.FileServer(gemini.Dir("/var/www")))
mux.Handle("/", gemini.FileServer(os.DirFS("/var/www")))
server.Handle("localhost", &mux)
if err := server.ListenAndServe(); err != nil {