From 32c7e8a01ba5ee1b0ea366d9eb567a4a4c0aade1 Mon Sep 17 00:00:00 2001 From: lukas Date: Fri, 16 Apr 2021 22:48:41 +0200 Subject: [PATCH] rename file --- apiGo/videoparser/{ReIndex.go => ReIndexVideos.go} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename apiGo/videoparser/{ReIndex.go => ReIndexVideos.go} (98%) diff --git a/apiGo/videoparser/ReIndex.go b/apiGo/videoparser/ReIndexVideos.go similarity index 98% rename from apiGo/videoparser/ReIndex.go rename to apiGo/videoparser/ReIndexVideos.go index 32305f2..32b00b7 100644 --- a/apiGo/videoparser/ReIndex.go +++ b/apiGo/videoparser/ReIndexVideos.go @@ -100,7 +100,7 @@ func processVideo(fileNameOrig string) { fmt.Printf("Processing %s video-", fileNameOrig) // match the file extension - r, _ := regexp.Compile(`\.[a-zA-Z0-9]+$`) + r := regexp.MustCompile(`\.[a-zA-Z0-9]+$`) fileName := r.ReplaceAllString(fileNameOrig, "") // match the year and cut year from name @@ -172,7 +172,7 @@ func addVideo(videoName string, fileName string, year int) { } func matchYear(fileName string) (int, string) { - r, _ := regexp.Compile(`\([0-9]{4}?\)`) + r := regexp.MustCompile(`\([0-9]{4}?\)`) years := r.FindAllString(fileName, -1) if len(years) == 0 { return -1, fileName