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,
|
||||
".jpg": true,
|
||||
".jpeg": true,
|
||||
".gif": true,
|
||||
".webp": true,
|
||||
".bmp": true,
|
||||
".avif": true,
|
||||
}
|
||||
|
||||
func isImageFile(path string) bool {
|
||||
|
|
@ -44,14 +42,14 @@ type CoverData struct {
|
|||
}
|
||||
|
||||
var (
|
||||
db *sql.DB
|
||||
tmpl *template.Template
|
||||
imaginaryURL string
|
||||
galleryPath string
|
||||
databasePath string
|
||||
listenAddr string
|
||||
listenPort int
|
||||
randomCovers []CoverData
|
||||
db *sql.DB
|
||||
tmpl *template.Template
|
||||
imaginaryURL string
|
||||
galleryPath string
|
||||
databasePath string
|
||||
listenAddr string
|
||||
listenPort int
|
||||
randomCovers []CoverData
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
@ -308,4 +306,3 @@ func handleIndex(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
tmpl.ExecuteTemplate(w, "index.html", data)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue