From fbdcdb469812a1ee7fe40787b0353037aa9fa6ec Mon Sep 17 00:00:00 2001 From: tjpcc Date: Mon, 1 May 2023 21:43:44 -0600 Subject: exercise router code in an example --- examples/fileserver/main.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'examples/fileserver/main.go') diff --git a/examples/fileserver/main.go b/examples/fileserver/main.go index d38a450..df5e81d 100644 --- a/examples/fileserver/main.go +++ b/examples/fileserver/main.go @@ -33,6 +33,10 @@ func main() { fs.GeminiFileHandler(fileSystem), ) + router := &sr.Router{} + router.Route("/*", handler) + handler = sr.HandlerFunc(router.Handler) + _, infoLog, _, errLog := logging.DefaultLoggers() // add request logging to stdout -- cgit v1.2.3