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

Interactivity feature with inquire #10

Merged
merged 7 commits into from Sep 18, 2023
Merged

Conversation

tornikegomareli
Copy link
Owner

This PR refactors the existing code to separate command-line options (CommandLineModel) from interactive prompt logic (Interactive).

Additionally, it introduces interactivity via the inquire library, providing a more user-friendly experience.

Changes:

  • Created CommandLineModel to hold command-line options like log_format, start_tag, etc.
  • Introduced Interactive to manage interactive prompts.
  • Interactive now holds an instance of CommandLineModel.
  • Added user prompts for each command-line argument using the inquire library.
  • Updated main.rs to initiate and utilize the new Interactive struct containing CommandLineModel.
  • Moved all interactive and parsing logic out of main into a new interactive module.

Motivation:

  • The refactoring provides a cleaner separation of concerns, adhering to the Single Responsibility Principle. The interactive prompts make the application much more user-friendly and less error-prone, offering a better user experience.

@tornikegomareli tornikegomareli self-assigned this Sep 18, 2023
@tornikegomareli tornikegomareli mentioned this pull request Sep 18, 2023
@tornikegomareli tornikegomareli merged commit 75359a7 into main Sep 18, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant