browser
browser copied to clipboard
Add explicit commands to binary
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.
@karlseguin thanks for the PR :pray: I think we should update some files accordingly:
- README.md https://github.com/lightpanda-io/browser/blob/main/README.md?plain=1#L64 and https://github.com/lightpanda-io/browser/blob/main/README.md?plain=1#L76
- Dockerfile https://github.com/lightpanda-io/browser/blob/main/Dockerfile#L79
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
./lightpandaconsider aserve - if no command is sent but a
--dumpoption is passed, ie./ligthpanda --dump, consider afetch - if no command is sent but another option is passed, ie
./lightpanda --host, consider aserve
I think we can have this backward compat mode until we tag a next release.