Skip to content

Commit 210b91e

Browse files
committed
add buffer size option
1 parent 5d2dfd3 commit 210b91e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

cmd/main.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const (
2020
)
2121

2222
var (
23+
bufferSize = flag.Int("buffer-size", 0, "initial buffer size for stream parsing")
2324
hexSecret = flag.String("secret", "", "hex-encoded HMAC secret value")
2425
hexSecretFile = flag.String("secret-file", "", "file containing single line with hex-encoded secret")
2526
showVersion = flag.Bool("version", false, "show program version and exit")
@@ -65,7 +66,8 @@ func run() int {
6566
}
6667

6768
err = (&handler.BasicHMACAuthHandler{
68-
Secret: secret,
69+
Secret: secret,
70+
BufferSize: *bufferSize,
6971
}).Run(os.Stdin, os.Stdout)
7072
if err != nil {
7173
log.Printf("auth handler terminated with error: %v", err)

0 commit comments

Comments
 (0)