Execute initialize the application and run it
()
| 52 | |
| 53 | // Execute initialize the application and run it |
| 54 | func (c *Cmd) Execute() { |
| 55 | c.init() |
| 56 | |
| 57 | err := c.Command.Execute() |
| 58 | if err != nil { |
| 59 | fmt.Println(err) |
| 60 | os.Exit(1) |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | func (c *Cmd) init() { |
| 65 | cobra.OnInitialize(func() { |