I've set up a simple Go static file server with http.FileServer
. If I have a directory structure like public > about > index.html
, the server will correctly resolve /about
to about > index.html
, but it adds a trailing slash so the url becomes /about/
.
Is there a simple way to remove these trailing slashes when using http.FileServer
? Ultimately, it works either way - it's mostly just a personal preference to not have the trailing slashes if possible.