Add file lua value

This commit is contained in:
2025-03-28 16:47:21 +01:00
parent a2201053c5
commit b77224176b
2 changed files with 9 additions and 3 deletions

View File

@@ -107,6 +107,9 @@ func main() {
startTime := time.Now()
var fileMutex sync.Mutex
// This aggregation is great but what if one modification replaces the whole entire file?
// Shit......
// TODO: Add "Isolate" field to modifications which makes them run alone
for file, commands := range associations {
workers <- struct{}{}
wg.Add(1)
@@ -129,7 +132,7 @@ func main() {
modifications := []utils.ReplaceCommand{}
for _, command := range commands {
logger.Info("Processing file %q with command %q", file, command.Regex)
commands, err := processor.ProcessRegex(fileDataStr, command)
commands, err := processor.ProcessRegex(fileDataStr, command, file)
if err != nil {
logger.Error("Failed to process file %q with command %q: %v", file, command.Regex, err)
return