How to custom handle a file not being found when using go static file server?
问题 So I'm using a go server to serve up a single page web application. This works for serving all the assets on the root route. All the CSS and HTML are served up correctly. fs := http.FileServer(http.Dir("build")) http.Handle("/", fs) So when the URL is http://myserverurl/index.html or http://myserverurl/styles.css , it serves the corresponding file. But for a URL like http://myserverurl/myCustompage , it throws 404 if myCustompage is not a file in the build folder. How do I make all routes for