The built-in FileServer method in standard net/http package can serve staic
files in the file syatem, but does not allow custom 404 Not Found handler, so I
implement my own FileServer method with custom 404 handler.
The idea of implementation of FileServer with custom 404 handler comes from the
implementation of StripPrefix method in the same net/http package. You can
read the code of StripPrefix method for more details.
The key idea of my implementation:
Accept the same parameters (FileSystem) as FileServer method, which is
return value of http.Dir in normal case.
Use the FileSystem.Open and os.IsNotExist methods to check if the file
exists. If not, call custom 404 handler. Otherwise serve the file with normal