From 38ff3807b3b97da22006b5bdcf03fdfaaa4b0582 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Thu, 7 Sep 2023 12:36:17 -0600 Subject: all the gopher CGI handlers to support gophernicus behaviors --- examples/gopher_fileserver/main.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'examples/gopher_fileserver/main.go') 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() -- cgit v1.2.3