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

feature: cobra-cli should not overwrite an existing main.go file if it already exists #88

Open
ethanholz opened this issue Jul 26, 2023 · 3 comments

Comments

@ethanholz
Copy link

When running cobra-cli init on an existing project with a main.go, it will overwrite the main.go. I don't think this behavior should be a default. Could we add functionality to at least move the old file to something like main.go.old?

@donovanglover
Copy link

Related:

It should be possible to patch cobra-cli with the PR above, although the lack of a response is concerning. For now I have decided against using cobra-cli due to the lack of activity.

@ethanholz
Copy link
Author

Hmm. Good to know thanks!

@dcjulian29
Copy link

dcjulian29 commented Dec 27, 2024

This should be extended to the "add" command. I accidentally ran the add command from the shell history and it resulted in me loosing a log of code that I'd implemented. Now I have to try to remember how I implemented and recreate the code best that I can remember.

And by the way, the PR mentioned above was never merged and has been closed so it looks like a fix was attempted but never accepted.

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

3 participants