This commit is contained in:
2025-03-28 01:26:26 +01:00
parent 22914fe243
commit 513773f641

16
main.go
View File

@@ -4,6 +4,7 @@ import (
"flag"
"fmt"
"os"
"sort"
"sync"
"time"
@@ -214,8 +215,19 @@ func main() {
stats.TotalModifications, stats.ProcessedFiles, stats.ProcessedFiles+stats.FailedFiles)
fmt.Printf("Operation complete! Modified %d values in %d/%d files\n",
stats.TotalModifications, stats.ProcessedFiles, stats.ProcessedFiles+stats.FailedFiles)
for command, count := range stats.ModificationsPerCommand {
logger.Info("Command %q made %d modifications", command, count)
sortedCommands := make([]string, 0, len(stats.ModificationsPerCommand))
for command := range stats.ModificationsPerCommand {
sortedCommands = append(sortedCommands, command)
}
sort.Strings(sortedCommands)
for _, command := range sortedCommands {
count := stats.ModificationsPerCommand[command]
if count > 0 {
logger.Info("\tCommand %q made %d modifications", command, count)
} else {
logger.Warning("\tCommand %q made no modifications", command)
}
}
}
}