diff options
author | tjpcc <tjp@ctrl-c.club> | 2023-05-01 21:43:44 -0600 |
---|---|---|
committer | tjpcc <tjp@ctrl-c.club> | 2023-05-01 21:43:44 -0600 |
commit | fbdcdb469812a1ee7fe40787b0353037aa9fa6ec (patch) | |
tree | 154dd0066efefc8f759cf4a912ecde706646001b /examples | |
parent | e4db6e1b99018bbcf70051adc15963751cb94215 (diff) |
exercise router code in an example
Diffstat (limited to 'examples')
-rw-r--r-- | examples/fileserver/main.go | 4 |
1 files changed, 4 insertions, 0 deletions
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 |