apply for pull request

This commit is contained in:
Artem Andreenko
2014-08-20 16:16:26 +07:00
parent 8d39b0d40f
commit ebef8dbc2e
3 changed files with 10 additions and 9 deletions

View File

@@ -33,9 +33,10 @@ Options:
-T Content-type, defaults to "text/html".
-a Basic authentication, username:password.
-allow-insecure Allow bad/expired TLS/SSL certificates.
-allow-insecure Allow bad/expired TLS/SSL certificates.
-disable-compression Disable compression
-disable-keepalive Disable keep-alive, prevents re-use of TCP connections between different HTTP requests
-cpus Number of used cpu cores (default for current machine is %d cores)
~~~

14
boom.go
View File

@@ -22,8 +22,8 @@ import (
gourl "net/url"
"os"
"regexp"
"strings"
"runtime"
"strings"
"github.com/miolini/boom/boomer"
)
@@ -38,11 +38,11 @@ var (
flagOutput = flag.String("o", "", "")
flagProxyAddr = flag.String("x", "", "")
flagC = flag.Int("c", 50, "")
flagN = flag.Int("n", 200, "")
flagQ = flag.Int("q", 0, "")
flagT = flag.Int("t", 0, "")
flagCpus = flag.Int("cpus", runtime.NumCPU(), "")
flagC = flag.Int("c", 50, "")
flagN = flag.Int("n", 200, "")
flagQ = flag.Int("q", 0, "")
flagT = flag.Int("t", 0, "")
flagCpus = flag.Int("cpus", runtime.GOMAXPROCS(-1), "")
flagInsecure = flag.Bool("allow-insecure", false, "")
flagDisableCompression = flag.Bool("disable-compression", false, "")
@@ -93,7 +93,7 @@ func (*netDnsResolver) Lookup(domain string) (addr []string, err error) {
func main() {
flag.Usage = func() {
fmt.Fprintf(os.Stderr, usage, runtime.NumCPU())
fmt.Fprintf(os.Stderr, usage, runtime.GOMAXPROCS(-1))
}
flag.Parse()

View File

@@ -70,7 +70,7 @@ type Boomer struct {
// Option to allow insecure TLS/SSL certificates.
AllowInsecure bool
// Option to disable decompress response
// Option to disable compression in response
DisableCompression bool
// Option to prevents re-use of TCP connections between different HTTP requests