clean: made pageError struct type

This commit is contained in:
Florian Sylvain
2023-08-12 22:38:01 +02:00
parent e575062209
commit 5c61796313
3 changed files with 14 additions and 8 deletions
+5
View File
@@ -21,6 +21,11 @@ var contentTypes = map[string]string{
".ico": "image/x-icon",
}
type PageError struct {
Message string `json:"message"`
IsError bool `json:"isError"`
}
func StaticFileServerWithContentType(fsys http.FileSystem) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
path := r.URL.Path