Add a --write and --diff flag; require --write to be set before making any changes, for safety

This commit is contained in:
Pim van Pelt
2025-08-28 11:18:59 +02:00
parent 6bc0071bdb
commit d027ec9108
8 changed files with 133 additions and 26 deletions

View File

@@ -12,7 +12,12 @@ import (
"path/filepath"
)
func generateKeys(yamlFile string) {
func generateKeys(yamlFile string, wantDiff bool, allowWrite bool, useColor bool) {
if !allowWrite {
fmt.Printf("Key generation requires --write flag\n")
return
}
config := loadConfig(yamlFile)
// Generate keys for each log