fsbrowse
A Go module that provides a web UI to browse an fs.FS. Effectively a slightly nicer-looking version of http.FileServer.
Requires Go 1.16 or newer, due to the usage of fs.FS. Also, the fs.FS being used must implement io.Seeker and fs.ReadDirFile on its files.
Usage
The module exports one function, FileServer
, which accepts an fs.FS and returns an http.Handler. Here's an example of how you might use this in practice:
root := os.DirFS("./some/path/somewhere")
http.ListenAndServe(":9876", fsbrowse.FileServer(root))