Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the cobra command factory function customizable #75

Open
szkiba opened this issue Jan 13, 2025 · 0 comments
Open

Make the cobra command factory function customizable #75

szkiba opened this issue Jan 13, 2025 · 0 comments
Assignees

Comments

@szkiba
Copy link
Collaborator

szkiba commented Jan 13, 2025

Make the cobra command factory function ( ̇cmd.New`) customizable with optional event handlers.

To make the k6exec cobra command reusable, it is necessary to provide the ability to use cobra command global event handlers (for example, PersistentPreRunE). If a given handler is also used by k6exec, it must be wrapped in k6exec.

In addition, the k6exec.Command function should also be customizable by passing an optional handler function to cobra command factory function.

@szkiba szkiba self-assigned this Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant