package routes import ( "io/fs" "net/http" ) func ServeFiles(fileSystem fs.FS, pathInFs string) http.Handler { newFs, err := fs.Sub(fileSystem, pathInFs) if err != nil { panic(err) } return http.FileServerFS(newFs) }