Add file lua value
This commit is contained in:
5
main.go
5
main.go
@@ -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
|
||||
|
Reference in New Issue
Block a user