func Execute() {
	if err := rootCmd.Execute(); err != nil {
		fmt.Println(err)
		os.Exit(1)
	}
	log.Println(mysqlDatabase)
}
Execute adds all child commands to the root command and sets flags appropriately.
This is called by main.main(). It only needs to happen once to the rootCmd.
package cmd
import (
	"fmt"
	"github.com/mitchellh/go-homedir"
	"github.com/spf13/cobra"
	"github.com/spf13/viper"
	"log"
	"os"
)
var cfgFile, mysqlUser, mysqlPassword, mysqlAddr, mysqlDatabase, mysqlCharset string
var rootCmd = &cobra.Command{
	Use:   "ginbro",
	Short: "Ginbro is a scaffold tool for Gin and GORM, one command to generate a mighty RESTful APIs App",
	Long: `
fastest way to generate a RESTful APIs application with MySQL in Go
support JWT Authorization Bearer Auth and JWT middleware
support brute-force-login firewall
build in swift golang-memory cache
generate GORM model from MySQL database schema
powered with Swagger document and SwaggerUI
capable of serve VueJs app's static files
configurable CORS middleware
`,
}