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

have CLI print help message if invalid number of args passsed #111

Open
albertlockett opened this issue Feb 15, 2024 · 0 comments
Open

have CLI print help message if invalid number of args passsed #111

albertlockett opened this issue Feb 15, 2024 · 0 comments

Comments

@albertlockett
Copy link
Contributor

Version

No response

Linux Version

No response

Is your feature request related to a problem? Please describe.

It would be nice if the CLI would print the help message for the command if there is an invalid number of arguments passed.

For example:

$ ~/go/bin/bee package hello                   
Error: accepts 2 arg(s), received 1
2024/02/15 16:59:00 exiting: accepts 2 arg(s), received 1

I would prefer if it printed this:

cmd := &cobra.Command{
Use: "package REGISTRY_REF DOCKER_IMAGE",
Short: "Package a BPF program OCI image with the `bee` runner in a docker image",
Long: `
The package command is used to package the desired BPF program along with the 'bee' runner in a Docker image.
This means that the resulting docker image is a single, runnable unit to load and attach your BPF proograms.
You can then ship this image around anywhere you run docker images, e.g. K8s.
Example workflow:
$ bee build examples/tcpconnect/tcpconnect.c tcpconnect
$ bee package tcpconnect bee-tcpconnect:latest
# deploy 'bee-tcpconnect:latest' to K8s cluster

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional Context

No response

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

No branches or pull requests

1 participant