diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/gopher_fileserver/main.go | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/examples/gopher_fileserver/main.go b/examples/gopher_fileserver/main.go index 244f61b..057aa21 100644 --- a/examples/gopher_fileserver/main.go +++ b/examples/gopher_fileserver/main.go @@ -3,7 +3,6 @@ package main import ( "context" "log" - "os" sr "tildegit.org/tjp/sliderule" "tildegit.org/tjp/sliderule/contrib/cgi" @@ -13,13 +12,11 @@ import ( ) func main() { - fileSystem := os.DirFS(".") - handler := sr.FallthroughHandler( - fs.GopherDirectoryDefault(fileSystem, "index.gophermap"), - fs.GopherDirectoryListing(fileSystem, nil), - cgi.GopherCGIDirectory("/cgi-bin", "./cgi-bin"), - fs.GopherFileHandler(fileSystem), + fs.GopherDirectoryDefault(".", nil), + fs.GopherDirectoryListing(".", nil), + cgi.GopherCGIDirectory("/cgi-bin", "./cgi-bin", nil), + fs.GopherFileHandler(".", nil), ) _, infoLog, _, errLog := logging.DefaultLoggers() |