remove gif from image extensions

This commit is contained in:
icefox 2025-12-31 00:29:42 -03:00
parent cbeb5d8e4c
commit ba6e785f5f
No known key found for this signature in database

19
main.go
View file

@ -21,10 +21,8 @@ var imageExtensions = map[string]bool{
".png": true, ".png": true,
".jpg": true, ".jpg": true,
".jpeg": true, ".jpeg": true,
".gif": true,
".webp": true, ".webp": true,
".bmp": true, ".bmp": true,
".avif": true,
} }
func isImageFile(path string) bool { func isImageFile(path string) bool {
@ -44,14 +42,14 @@ type CoverData struct {
} }
var ( var (
db *sql.DB db *sql.DB
tmpl *template.Template tmpl *template.Template
imaginaryURL string imaginaryURL string
galleryPath string galleryPath string
databasePath string databasePath string
listenAddr string listenAddr string
listenPort int listenPort int
randomCovers []CoverData randomCovers []CoverData
) )
func main() { func main() {
@ -308,4 +306,3 @@ func handleIndex(w http.ResponseWriter, r *http.Request) {
tmpl.ExecuteTemplate(w, "index.html", data) tmpl.ExecuteTemplate(w, "index.html", data)
} }