From 18de13bda3e41293e088e92ce67b80298d463396 Mon Sep 17 00:00:00 2001 From: Falk Scheerschmidt Date: Thu, 15 Apr 2021 17:48:24 +0200 Subject: [PATCH] fix flags in commands --- cmd/copy-pad.go | 2 +- cmd/metrics.go | 2 +- cmd/move-pad.go | 2 +- cmd/purge.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/copy-pad.go b/cmd/copy-pad.go index c5f066e..e566b42 100644 --- a/cmd/copy-pad.go +++ b/cmd/copy-pad.go @@ -20,7 +20,7 @@ var ( ) func init() { - copyPadCmd.LocalFlags().BoolVar(&forceCopy, "force", false, "If set and the destination pad exists, it will be overwritten.") + copyPadCmd.Flags().BoolVar(&forceCopy, "force", false, "If set and the destination pad exists, it will be overwritten.") rootCmd.AddCommand(copyPadCmd) } diff --git a/cmd/metrics.go b/cmd/metrics.go index 5f2d9e2..adb12b1 100644 --- a/cmd/metrics.go +++ b/cmd/metrics.go @@ -23,7 +23,7 @@ var ( ) func init() { - metricsCmd.LocalFlags().StringVar(&listenAddr, "listen.addr", ":9012", "") + metricsCmd.Flags().StringVar(&listenAddr, "listen.addr", ":9012", "") rootCmd.AddCommand(metricsCmd) } diff --git a/cmd/move-pad.go b/cmd/move-pad.go index 2cb94b9..a34f953 100644 --- a/cmd/move-pad.go +++ b/cmd/move-pad.go @@ -20,7 +20,7 @@ var ( ) func init() { - movePadCmd.LocalFlags().BoolVar(&forceMove, "force", false, "If set and the destination pad exists, it will be overwritten.") + movePadCmd.Flags().BoolVar(&forceMove, "force", false, "If set and the destination pad exists, it will be overwritten.") rootCmd.AddCommand(movePadCmd) } diff --git a/cmd/purge.go b/cmd/purge.go index 3240460..dc008b1 100644 --- a/cmd/purge.go +++ b/cmd/purge.go @@ -30,8 +30,8 @@ Pads with the suffix "-keep" will be deleted after 365 days of inactivity. ) func init() { - purgeCmd.LocalFlags().IntVar(&concurrency, "concurrency", 4, "Concurrency for the purge process") - purgeCmd.LocalFlags().BoolVar(&dryRun, "dry-run", false, "Enable dry-run") + purgeCmd.Flags().IntVar(&concurrency, "concurrency", 4, "Concurrency for the purge process") + purgeCmd.Flags().BoolVar(&dryRun, "dry-run", false, "Enable dry-run") rootCmd.AddCommand(purgeCmd) }