From 9cd738f25a8e2fcd06be01f513b3be1b18daaadd Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Wed, 19 Apr 2023 12:38:31 +1000 Subject: [PATCH] Deprecate options (#299) --- .snapshots/TestHelp | 4 +++- arguments.go | 11 ++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.snapshots/TestHelp b/.snapshots/TestHelp index f09e95fe..8cd6ee28 100644 --- a/.snapshots/TestHelp +++ b/.snapshots/TestHelp @@ -21,9 +21,11 @@ Application Options: --header=
... Custom headers -f, --ignore-fragments Ignore URL fragments --format=[text|json|junit] Output format (default: text) - --json Output results in JSON + --json Output results in JSON (deprecated) --experimental-verbose-json Include successful results in JSON + (deprecated) --junit Output results as JUnit XML file + (deprecated) -r, --max-redirections= Maximum number of redirections (default: 64) --rate-limit= Max requests per second diff --git a/arguments.go b/arguments.go index 5c93454d..a9dba4f1 100644 --- a/arguments.go +++ b/arguments.go @@ -22,11 +22,12 @@ type arguments struct { // TODO Remove a short option. IgnoreFragments bool `short:"f" long:"ignore-fragments" description:"Ignore URL fragments"` Format string `long:"format" description:"Output format" default:"text" choice:"text" choice:"json" choice:"junit"` - // TODO Merge text, JSON, and JUnit XML format options into --format. - JSONOutput bool `long:"json" description:"Output results in JSON"` - // TODO Integrate this option into --verbose. - VerboseJSON bool `long:"experimental-verbose-json" description:"Include successful results in JSON"` - JUnitOutput bool `long:"junit" description:"Output results as JUnit XML file"` + // TODO Remove this option. + JSONOutput bool `long:"json" description:"Output results in JSON (deprecated)"` + // TODO Remove this option. + VerboseJSON bool `long:"experimental-verbose-json" description:"Include successful results in JSON (deprecated)"` + // TODO Remove this option. + JUnitOutput bool `long:"junit" description:"Output results as JUnit XML file (deprecated)"` MaxRedirections int `short:"r" long:"max-redirections" value-name:"" default:"64" description:"Maximum number of redirections"` RateLimit int `long:"rate-limit" value-name:"" description:"Max requests per second"` Timeout int `short:"t" long:"timeout" value-name:"" default:"10" description:"Timeout for HTTP requests in seconds"`