cleanup(miniooni): remove --limit option (#840)
This option has been disabled for a long time and we said in the codebase we were going to remove it after 2021-11-01. So, it feels okay to remove it. This diff is a cleanup in preparation for https://github.com/ooni/probe/issues/2184.
This commit is contained in:
parent
97864b324f
commit
a960ca51f0
|
@ -31,7 +31,6 @@ type Options struct {
|
||||||
HomeDir string
|
HomeDir string
|
||||||
Inputs []string
|
Inputs []string
|
||||||
InputFilePaths []string
|
InputFilePaths []string
|
||||||
Limit int64
|
|
||||||
MaxRuntime int64
|
MaxRuntime int64
|
||||||
NoJSON bool
|
NoJSON bool
|
||||||
NoCollector bool
|
NoCollector bool
|
||||||
|
@ -77,10 +76,6 @@ func init() {
|
||||||
&globalOptions.Inputs, "input", 'i',
|
&globalOptions.Inputs, "input", 'i',
|
||||||
"Add test-dependent input to the test input", "INPUT",
|
"Add test-dependent input to the test input", "INPUT",
|
||||||
)
|
)
|
||||||
getopt.FlagLong(
|
|
||||||
&globalOptions.Limit, "limit", 0,
|
|
||||||
"Limit the number of URLs tested by Web Connectivity", "N",
|
|
||||||
)
|
|
||||||
getopt.FlagLong(
|
getopt.FlagLong(
|
||||||
&globalOptions.MaxRuntime, "max-runtime", 0,
|
&globalOptions.MaxRuntime, "max-runtime", 0,
|
||||||
"Maximum runtime in seconds when looping over a list of inputs (zero means infinite)", "N",
|
"Maximum runtime in seconds when looping over a list of inputs (zero means infinite)", "N",
|
||||||
|
@ -273,15 +268,6 @@ func maybeWriteConsentFile(yes bool, filepath string) (err error) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// limitRemoved is the text printed when the user uses --limit
|
|
||||||
const limitRemoved = `USAGE CHANGE: The --limit option has been removed in favor of
|
|
||||||
the --max-runtime option. Please, update your script to use --max-runtime
|
|
||||||
instead of --limit. The argument to --max-runtime is the maximum number
|
|
||||||
of seconds after which to stop running Web Connectivity.
|
|
||||||
|
|
||||||
This error message will be removed after 2021-11-01.
|
|
||||||
`
|
|
||||||
|
|
||||||
// tunnelAndProxy is the text printed when the user specifies
|
// tunnelAndProxy is the text printed when the user specifies
|
||||||
// both the --tunnel and the --proxy options
|
// both the --tunnel and the --proxy options
|
||||||
const tunnelAndProxy = `USAGE ERROR: The --tunnel option and the --proxy
|
const tunnelAndProxy = `USAGE ERROR: The --tunnel option and the --proxy
|
||||||
|
@ -297,7 +283,6 @@ of miniooni, when we will allow a tunnel to use a proxy.
|
||||||
// This function will panic in case of a fatal error. It is up to you that
|
// This function will panic in case of a fatal error. It is up to you that
|
||||||
// integrate this function to either handle the panic of ignore it.
|
// integrate this function to either handle the panic of ignore it.
|
||||||
func MainWithConfiguration(experimentName string, currentOptions Options) {
|
func MainWithConfiguration(experimentName string, currentOptions Options) {
|
||||||
fatalIfFalse(currentOptions.Limit == 0, limitRemoved)
|
|
||||||
fatalIfTrue(currentOptions.Proxy != "" && currentOptions.Tunnel != "",
|
fatalIfTrue(currentOptions.Proxy != "" && currentOptions.Tunnel != "",
|
||||||
tunnelAndProxy)
|
tunnelAndProxy)
|
||||||
if currentOptions.Tunnel != "" {
|
if currentOptions.Tunnel != "" {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user