Installing

Using Cobra is easy. First, use go get to install the latest version
of the library. This command will install the cobra generator executable
along with the library and its dependencies:

  1. go get -u github.com/spf13/cobra/cobra

Next, include Cobra in your application:

  1. import "github.com/spf13/cobra"