Clean up regex.go a little

This commit is contained in:
2025-03-27 23:02:33 +01:00
parent cc30c2bdcb
commit bf72734b90
4 changed files with 24 additions and 15 deletions

View File

@@ -4,7 +4,6 @@ import (
"flag"
"fmt"
"os"
"sort"
"sync"
"modify/processor"
@@ -124,11 +123,6 @@ func main() {
}
// Sort commands in reverse order for safe replacements
sort.Slice(modifications, func(i, j int) bool {
return modifications[i].From > modifications[j].From
})
logger.Trace("Applying %d replacement commands in reverse order", len(modifications))
fileDataStr, count := utils.ExecuteModifications(modifications, fileDataStr)
logger.Info("Executed %d modifications for file %q", count, file)