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

refactor: Switching backend to spf13/cobra #431

Merged
1 commit merged into from
Jun 30, 2023

Conversation

mirac-cisco
Copy link
Contributor

Description

Discussing with @sambetts-cisco, it seemed that it's better to switch backend's command parsing to also use spf13/cobra like the cli. The PR is just replacing one with the other, maintaining the same ENV parsing and same command structure.

New help:

VMClarity Backend

Usage:
  vmclarity-backend [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  run         Starts the server
  version     Displays the version

Flags:
  -h, --help      help for vmclarity-backend
  -v, --version   version for vmclarity-backend

Use "vmclarity-backend [command] --help" for more information about a command.

I've ran the make test which all pass, also manually confirmed that the ENV variables are correctly received. The behavior is identical as before.

Type of Change

[ ] Bug Fix
[ ] New Feature
[ ] Breaking Change
[x] Refactor
[ ] Documentation
[ ] Other (please describe)

Checklist

  • I have read the contributing guidelines
  • Existing issues have been referenced (where applicable)
  • I have verified this change is not present in other open pull requests
  • Functionality is documented
  • All code style checks pass
  • New code contribution is covered by automated tests
  • All new and existing tests pass

@mirac-cisco mirac-cisco requested a review from a team as a code owner June 23, 2023 10:31
Copy link
Contributor

@chrisgacsal chrisgacsal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! :shipit:

@mirac-cisco mirac-cisco changed the title feat: Switching backend to spf13/cobra refactor: Switching backend to spf13/cobra Jun 23, 2023
@ghost ghost added this pull request to the merge queue Jun 30, 2023
Merged via the queue into openclarity:main with commit 6da5cf0 Jun 30, 2023
5 checks passed
@mirac-cisco mirac-cisco deleted the feature/backend-cobra-cli branch August 21, 2023 11:46
@chrisgacsal chrisgacsal mentioned this pull request Nov 6, 2023
7 tasks
This pull request was closed.
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

Successfully merging this pull request may close these issues.

None yet

3 participants