remove gif from image extensions
This commit is contained in:
parent
cbeb5d8e4c
commit
ba6e785f5f
1 changed files with 8 additions and 11 deletions
19
main.go
19
main.go
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue