Try to replace http.Dir("/static/")
with http.Dir("static")
(which will be the relative path to your static dir) or with http.Dir("/absolute/path/to/static")
. Your example with this single change works for me.
Also see httprouter's ServeFiles documentation:
func (r *Router) ServeFiles(path string, root http.FileSystem)
ServeFiles serves files from the given file system root. The path must end with "/*filepath", files are then served from the local path /defined/root/dir/*filepath. For example if root is "/etc" and *filepath is "passwd", the local file "/etc/passwd" would be served. Internally a http.FileServer is used, therefore http.NotFound is used instead of the Router's NotFound handler. To use the operating system's file system implementation, use http.Dir:
router.ServeFiles("/src/*filepath", http.Dir("/var/www"))
This might also be of help - Third-party router and static files
I must admit that it's unclear to me why 'static' is needed twice. If I set http.Dir to "." it all works with the single difference that I need to navigate to localhost:3001/static/static/style.css