invalid argument for flag `--ttr
Opened this issue · 0 comments
jpmens commented
Building beanstool with go version go1.16.3 darwin/amd64
produces the above diagnostic on sundry commands:
$ ./beanstool stats
invalid argument for flag `--ttr' (expected time.Duration): time: missing unit in duration "60"
Usage:
beanstool [OPTIONS] stats [stats-OPTIONS]
...
$ ./beanstool tail -t default
invalid argument for flag `--ttr' (expected time.Duration): time: missing unit in duration "60"
Usage:
beanstool [OPTIONS] tail [tail-OPTIONS]
This small patch fixes that for me:
diff --git cli/put.go cli/put.go
index df7eeb1..0a01f5d 100644
--- cli/put.go
+++ cli/put.go
@@ -12,7 +12,7 @@ type PutCommand struct {
Body string `short:"b" long:"body" description:"plain text data for the job." required:"true"`
Priority uint32 `short:"" long:"priority" description:"priority for the job." default:"1024"`
Delay time.Duration `short:"" long:"delay" description:"delay for the job." default:"0"`
- TTR time.Duration `short:"" long:"ttr" description:"TTR for the job." default:"60"`
+ TTR time.Duration `short:"" long:"ttr" description:"TTR for the job." default:"60s"`
Command
}