Skip to content

Commit

Permalink
add version
Browse files Browse the repository at this point in the history
  • Loading branch information
Mengxi Zhang committed Aug 9, 2024
1 parent d8a7c57 commit 96d6821
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ release:
GOOS=windows GOARCH=amd64 go build -o ./bin/$(binary)_windows_amd64
GOOS=linux GOARCH=amd64 go build -o ./bin/$(binary)_linux_amd64
GOOS=darwin GOARCH=amd64 go build -o ./bin/$(binary)_darwin_amd64
GOOS=darwin GOARCH=arm64 go build -o ./bin/$(binary)_darwin_arm64
9 changes: 6 additions & 3 deletions hey.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
const (
headerRegexp = `^([\w-]+):\s*(.+)`
authRegexp = `^(.+):([^\s].+)`
heyUA = "hey/0.0.1"
heyUA = "mengxi-hey/1.0.0"
)

var (
Expand Down Expand Up @@ -70,7 +70,10 @@ var (
certKey = flag.String("cert-key", "", "")
)

var usage = `Usage: hey [options...] <url>
var usage = `
Version: %s
Usage: hey [options...] <url>
Options:
-n Number of requests to run. Default is 200.
Expand Down Expand Up @@ -112,7 +115,7 @@ Options:

func main() {
flag.Usage = func() {
fmt.Fprint(os.Stderr, fmt.Sprintf(usage, runtime.NumCPU()))
fmt.Fprint(os.Stderr, fmt.Sprintf(usage, heyUA, runtime.NumCPU()))
}

var hs headerSlice
Expand Down

0 comments on commit 96d6821

Please sign in to comment.