diff --git a/internal/cli/cli.go b/internal/cli/cli.go index d702db4..cc30a9b 100644 --- a/internal/cli/cli.go +++ b/internal/cli/cli.go @@ -12,6 +12,8 @@ import ( type Options struct { ShowVersion bool + WebhookURL string + TimeoutSec int } func Run(args []string) int { @@ -26,6 +28,10 @@ func run(args []string, stdin io.Reader, stdout, stderr io.Writer) int { var opt Options fs.BoolVar(&opt.ShowVersion, "version", false, "show version") fs.BoolVar(&opt.ShowVersion, "V", false, "show version (short)") + // other options + fs.StringVar(&opt.WebhookURL, "webhook", "", "Slack Incoming Webhook URL (or env SLACK_WEBHOOK_URL)") + fs.IntVar(&opt.TimeoutSec, "timeout", 10, "HTTP timeout seconds") + if err := fs.Parse(args[1:]); err != nil { if err == flag.ErrHelp {