You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like the k6 command-line Go cobra CLI commands/subcommands to be publicly exposed. Additionally, I would find it practical if there was a single entry-point to obtain an instance of the k6 cobra CLI via a function call as suggested below.
Why
So that as a developer I do not have to attempt to rely on the command line argument from the shell perspective to be able to call k6 from another program reliably. Currently, launcher programs relying on the k6 binary struggle to properly parse k6 command arguments, and without proper programatically accessible definitions, launchers can't reliably identify available flags, and know which flags need arguments. Furthermore, creating our own definitions, and heuristics, and duplicating them in various projects creates technical debt and maintenance issues down the road.
How
The solution implied is to make k6's subcommand definitions accessible to external programs. This would replace current workarounds with a proper integration path. It would provide a single source of truth for command definitions. I suggest creating a cobra.Command factory function for the k6 root command in the public k6 go API.
What
I would like the k6 command-line Go cobra CLI commands/subcommands to be publicly exposed. Additionally, I would find it practical if there was a single entry-point to obtain an instance of the k6 cobra CLI via a function call as suggested below.
Why
So that as a developer I do not have to attempt to rely on the command line argument from the shell perspective to be able to call k6 from another program reliably. Currently, launcher programs relying on the k6 binary struggle to properly parse k6 command arguments, and without proper programatically accessible definitions, launchers can't reliably identify available flags, and know which flags need arguments. Furthermore, creating our own definitions, and heuristics, and duplicating them in various projects creates technical debt and maintenance issues down the road.
How
The solution implied is to make k6's subcommand definitions accessible to external programs. This would replace current workarounds with a proper integration path. It would provide a single source of truth for command definitions. I suggest creating a
cobra.Command
factory function for the k6 root command in the public k6 go API.Something like this:
Connected issues
The root cause of the following issues is the lack of k6 subcommand definitions:
The text was updated successfully, but these errors were encountered: