Skip to content

Commit d7166a4

Browse files
committed
error on suprious positional args
1 parent 722d618 commit d7166a4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

cmd/goat/firehose.go

+3
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ func runFirehose(cctx *cli.Context) error {
8181

8282
var relayHost string
8383
if cctx.IsSet("relay-host") {
84+
if cctx.Args().Len() != 0 {
85+
return errors.New("error: unused positional args")
86+
}
8487
relayHost = cctx.String("relay-host")
8588
} else {
8689
if cctx.Args().Len() == 1 {

0 commit comments

Comments
 (0)