cobra-cli icon indicating copy to clipboard operation
cobra-cli copied to clipboard

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

Open ethanholz opened this issue 1 year ago • 2 comments

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?

ethanholz avatar Jul 26 '23 15:07 ethanholz

Related:

  • https://github.com/spf13/cobra-cli/issues/59
  • https://github.com/spf13/cobra-cli/pull/68

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.

donovanglover avatar Jul 27 '23 11:07 donovanglover

Hmm. Good to know thanks!

ethanholz avatar Jul 27 '23 15:07 ethanholz