Skip to content

Conversation

@polldo
Copy link
Contributor

@polldo polldo commented Jul 21, 2021

Motivation

This PR changes the structure of the repo in order to make it easier to add new commands.

Change description

The old command package has been split in two packages:

  • cli package contains the logic to handle the cli.
  • command package contains the business logic of the commands.

This decoupling allows commands to be called programmatically or through other interfaces (e.g. rpc)

Also, cli modules no longer needs visibility of the root command. Instead, the root is in charge of instantiating the commands.

Additional Notes

Reviewer checklist

  • PR address a single concern.
  • PR title and description are properly filled.
  • Changes will be merged in master.
  • Changes are covered by tests.
  • Logging is meaningful in case of troubleshooting.
  • History is clean, commit messages are meaningful (see CONTRIBUTING.md) and are well formatted.

@polldo polldo requested a review from zmoog July 21, 2021 14:24
@polldo polldo changed the title Polldo/restructure Restructure commands Jul 21, 2021
Copy link
Contributor

@zmoog zmoog left a comment

Choose a reason for hiding this comment

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

LGTM

@polldo polldo merged commit 3eb2509 into main Jul 21, 2021
@polldo polldo deleted the polldo/restructure branch July 21, 2021 15:10
polldo pushed a commit that referenced this pull request Sep 2, 2022
* Restructure commands organization

* Restructure mqtt package

* Split ping in cli and command

* Rename ping params
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.

2 participants