Skip to content

A Go module that provides a web UI to browse an fs.FS. Effectively a slightly nicer-looking version of http.FileServer.

License

Notifications You must be signed in to change notification settings

thatoddmailbox/fsbrowse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fsbrowse Build

Screenshot

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))

About

A Go module that provides a web UI to browse an fs.FS. Effectively a slightly nicer-looking version of http.FileServer.

Resources

License

Stars

Watchers

Forks

Packages

No packages published