Skip to content

Conversation

@karlseguin
Copy link
Collaborator

Changes are fairly superfluous. I wanted to remove the error.NoError, but then thought having more explicit command -> options might be good (especially if we add more command and/or options).

I also dupe the string arguments (i.e. host). While not duping them is safe on linux/darwin, it isn't clear to me from the documentation that this is guaranteed.

@krichprollsch
Copy link
Member

@karlseguin thanks for the PR 🙏
I think we should update some files accordingly:

Since we have already some users, I would like to keep a backward compatbility (with a warning log displayed maybe?)
ie:

  • if nothing is passed, ie ./lightpanda consider a serve
  • if no command is sent but a --dump option is passed, ie ./ligthpanda --dump, consider a fetch
  • if no command is sent but another option is passed, ie ./lightpanda --host, consider a serve

@krichprollsch
Copy link
Member

I think we can have this backward compat mode until we tag a next release.

./lightpanda serve --host ...
./lightpanda fetch https://...

Makes it easier to communicate / document which command has which options.

Internally added a "usage" command for displaying the usage - removing the need
for error.NoError :|
@krichprollsch krichprollsch merged commit a22e1bc into lightpanda-io:main Feb 25, 2025
9 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Feb 25, 2025
@karlseguin karlseguin deleted the cli_commands branch February 26, 2025 01:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants