From 3ca28cc06d0360cff738bd998056163af2bb3867 Mon Sep 17 00:00:00 2001 From: divyam234 <47589864+divyam234@users.noreply.github.com> Date: Fri, 19 Apr 2024 23:11:07 +0530 Subject: [PATCH] fix: category for filename --- internal/category/category.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/category/category.go b/internal/category/category.go index 219a13b..c943cb0 100644 --- a/internal/category/category.go +++ b/internal/category/category.go @@ -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