Better pre-flight errors (#288)

This commit is contained in:
Joona Hoikkala 2020-08-30 15:22:06 +03:00 committed by GitHub
parent 0ce941326b
commit a4b3154484
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -4,6 +4,7 @@
- New CLI flag `-rate` to set maximum rate of requests per second. The adjustment is dynamic.
- Changed
- Pre-flight errors are now displayed also after the usage text to prevent the need to scroll through backlog.
- v1.1.0
- New

View file

@ -145,17 +145,20 @@ func main() {
if err := prepareConfig(&opts, &conf); err != nil {
fmt.Fprintf(os.Stderr, "Encountered error(s): %s\n", err)
Usage()
fmt.Fprintf(os.Stderr, "Encountered error(s): %s\n", err)
os.Exit(1)
}
job, err := prepareJob(&conf)
if err != nil {
fmt.Fprintf(os.Stderr, "Encountered error(s): %s\n", err)
Usage()
fmt.Fprintf(os.Stderr, "Encountered error(s): %s\n", err)
os.Exit(1)
}
if err := prepareFilters(&opts, &conf); err != nil {
fmt.Fprintf(os.Stderr, "Encountered error(s): %s\n", err)
Usage()
fmt.Fprintf(os.Stderr, "Encountered error(s): %s\n", err)
os.Exit(1)
}