You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
package main |
|
|
|
import ( |
|
"fmt" |
|
"github.com/spf13/cobra" |
|
) |
|
|
|
func main() { |
|
Cmd := &cobra.Command{ |
|
Use: "model", |
|
} |
|
mysqlCmd := &cobra.Command{ |
|
Use: "mysql", |
|
RunE: func(cmd *cobra.Command, args []string) error { |
|
fmt.Println("aaa") |
|
return nil |
|
}, |
|
} |
|
|
|
Cmd.AddCommand(mysqlCmd) |
|
Cmd.Execute() |
|
}
|
|
|