forked from itachi123456789/httpflash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
30 lines (23 loc) · 827 Bytes
/
main.go
File metadata and controls
30 lines (23 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package main
import (
"flag"
"runtime"
)
import (
"httpflash/common"
"httpflash/httptask"
)
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
flag.StringVar(&common.URL, "url", "127.0.0.1:80", "<ipaddress:port> | default 127.0.0.1:80")
flag.StringVar(&common.METHOD, "method", "GET", "<GET | POST | PUT | HEAD | PATCH | DELETE | OPTIONS | TRACE | CONNECT> | default GET")
flag.StringVar(&common.HEADER, "header", "", "<'key: value, key: value'> | default none")
flag.StringVar(&common.COOKIE, "cookie", "", "<'name=value;name=value'> | default none")
flag.StringVar(&common.DATA, "data", "", "<'name=value;name=value'> | default none")
flag.Uint64Var(&common.VCLIENT, "client", 10, "default 10")
flag.Uint64Var(&common.VCLICK, "click", 10, "default 10")
flag.Parse()
}
func main() {
httptask.HttpTask()
}