Skip to content

armgit / hey

Public Imported from GitHub
0

HTTP load generator, ApacheBench (ab) replacement

Go

Print malformed input when parsing fails.

Burcu Dogan194ee49b885e
diff --git a/boom.go b/boom.go
index a6076bf..252046c 100644
--- a/boom.go
+++ b/boom.go
@@ -15,7 +15,6 @@
package main
import (
- "errors"
"flag"
"fmt"
"net/http"
@@ -191,7 +190,7 @@ func parseInputWithRegexp(input, regx string) ([]string, error) {
re := regexp.MustCompile(regx)
matches := re.FindStringSubmatch(input)
if len(matches) < 1 {
- return nil, errors.New("Could not parse provided input")
+ return nil, fmt.Errorf("could not parse the provided input; input = %v", input)
}
return matches, nil
}