Skip to content

Commit

Permalink
pass limit to scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
gernest committed Feb 13, 2024
1 parent c3db571 commit 563ffe7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions load/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ func CMD() *cli.Command {
Usage: "URL to vince instance you want to generate load for",
Value: "http://localhost:8080",
},
&cli.IntFlag{
Name: "limit",
Value: 10,
},
},
Action: func(ctx context.Context, c *cli.Command) error {
vince := c.String("vince")
Expand All @@ -45,6 +49,7 @@ func CMD() *cli.Command {
}
vm := goja.New()
vm.Set("createSession", program.NewSession)
vm.Set("limit", c.Int("limit"))
o := vm.NewObject()
o.Set("log", fmt.Println)
vm.Set("console", o)
Expand Down

0 comments on commit 563ffe7

Please sign in to comment.