...

/

Refactoring Multi-git to use Cobra - The Root Command

Refactoring Multi-git to use Cobra - The Root Command

In this lesson, we will do the heavy lifting. First, we'll create a Cobra root command and then port the logic in the current main.go of multi-git into the root command.

Adding the root command

Since multi-git is an existing application, we will not use the Cobra generator and just add the root command ourselves. Let’s place it according to ...