Understanding the Cobra Generator

You'll learn about the Cobra generator and use the Cobra generator to generate an application skeleton from scratch in this lesson.

The Cobra generator is another good way to utilize Cobra if you want to benefit from its established best practices and conventions.

What is the Cobra generator?

The generator is a command-line program that comes with Cobra. You can install it using the go tool

$ go get github.com/spf13/cobra/cobra/...

After you install Cobra it should be on your path. Try it out in the terminal below. Just type cobra

Get hands-on with 1200+ tech skills courses.