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

Adding Clear Function #1

Open
connellyw opened this issue May 4, 2021 · 1 comment
Open

Adding Clear Function #1

connellyw opened this issue May 4, 2021 · 1 comment

Comments

@connellyw
Copy link

Context and feature:
Adding a clear function that erases everything stored on the JSON file. This will improve user interaction by making it easier to do multiple portfolios.

Proposed solution:
Create a new function in portfolio.go file to clear all entities in JSON file.

@noorbuchi
Copy link
Collaborator

Thank you for your interest in this project and for willing to work on adding new features! I think that the functionality you're proposing is important, however, you should be careful about how you implement it. Specifically, erasing the contents of the JSON file will likely cause an error because the program will detect it but will throw an error when attempting to read its contents. Instead, I propose that you give the user the option to delete the portfolio file completely and avoid any potential issues. You can do this in many different ways, this could be a feature specific to the web application in streamlit, where the user can click a button and the python program deletes the file. OR, you can add the functionality to Golang and make it accessible using the existing command-line interface. You'll then have to run the correct go command using python and send in the appropriate arguments. Please feel free to continue this conversation here if you need help or clarifications. Also, make sure to create a fork with all the changes you're proposing and then you can open a PR so we can further review and discuss this. Thanks again!

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

No branches or pull requests

2 participants