diff --git a/README.md b/README.md index 287cae9..60920d4 100644 --- a/README.md +++ b/README.md @@ -20,15 +20,15 @@ Usage of ./expiredis: Set a TTL of 3600 (1 hour) for all keys without a TTL, processing 1000 keys at a time ```bash -expiredis -limit -1 -count 1000 -set-ttl 3600 +expiredis -limit -1 -count 1000 -set-ttl 3600 -dry-run=false ``` Delete all keys matching `foo:*` ```bash -expiredis -limit -1 -pattern "foo:*" -delete +expiredis -limit -1 -pattern "foo:*" -delete -dry-run=false ``` Reduce expiry by 86400 seconds of keys matching `bar:*` with a minimum TTL of 86400 (1 day) ```bash -expiredis -limit -1 -pattern "bar:*" -subtract-ttl 86400 +expiredis -limit -1 -pattern "bar:*" -subtract-ttl 86400 -dry-run=false ``` diff --git a/main.go b/main.go index ff734ae..4e4a781 100644 --- a/main.go +++ b/main.go @@ -36,7 +36,7 @@ func main() { fs := flag.NewFlagSetWithEnvPrefix(NAME, strings.ToUpper(NAME), flag.ExitOnError) fs.BoolVar(&verbose, "verbose", false, "debug logging") - fs.BoolVar(&dryRun, "dry-run", false, "dry run, no destructive commands") + fs.BoolVar(&dryRun, "dry-run", true, "dry run, no destructive commands") fs.StringVar(&url, "url", "redis://", "URI of Redis server (https://www.iana.org/assignments/uri-schemes/prov/redis)") fs.StringVar(&pattern, "pattern", "*", "Pattern of keys to process") fs.IntVar(&limit, "limit", 100, "Maximum number keys to process")