Again
This commit is contained in:
16
main.go
16
main.go
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user