This means that whenever you handle requests that serves HTTP requests with the contents of the file system rooted at root, it try to server files declared in http.Dir
which uses the operating system's file system implementation.
This means that whenever you access your web server index url it will try to serve files under the operating system /static/
directory.
To serve a directory on disk under an alternate URL path you can use StripPrefix
to modify the request URL's path before the FileServer
sees it.
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("/your/directory/to/static/files"))))
http.ListenAndServe(":8989", nil)