fix: category for filename

This commit is contained in:
divyam234 2024-04-19 23:11:07 +05:30
parent 15a037c7ee
commit 3ca28cc06d

View file

@ -1,4 +1,4 @@
package catregory
package category
import (
"path/filepath"
@ -25,7 +25,7 @@ var (
)
func GetCategory(fileName string) Category {
fileExtension := strings.ToLower(filepath.Ext(fileName))
fileExtension := strings.Split(strings.ToLower(filepath.Ext(fileName)), ".")[1]
if contains(documentExtensions, fileExtension) {
return Document