Documentation ¶
Overview ¶
Package commands process flags/environment variables/config file It contains global variables with configs and commands nolint: gochecknoglobals, gochecknoinits
Package commands process flags/environment variables/config file It contains global variables with configs and commands nolint: gochecknoglobals, gochecknoinits
Package commands process flags/environment variables/config file It contains global variables with configs and commands nolint: gochecknoglobals, gochecknoinits
Package commands process flags/environment variables/config file It contains global variables with configs and commands nolint: gochecknoglobals, gochecknoinits
Package commands process flags/environment variables/config file. It contains global variables with configs and commands nolint: gochecknoglobals, gochecknoinits
Package commands process flags/environment variables/config file It contains global variables with configs and commands nolint: gochecknoglobals, gochecknoinits
Package commands process flags/environment variables/config file It contains global variables with configs and commands nolint: gochecknoglobals, gochecknoinits
Package commands process flags/environment variables/config file It contains global variables with configs and commands nolint: gochecknoglobals, gochecknoinits
Index ¶
Constants ¶
This section is empty.
Variables ¶
var RootCmd = &cobra.Command{ Use: "caldera", Short: "A service boilerplate generator", Long: `In this mode, you'll be asked about the general properties associated with the new service. The configuration file will be used for all other data, such as the host, port, etc., if you have saved it before. Otherwise, the default settings will be used.`, Run: func(cmd *cobra.Command, args []string) { cfg := new(config.Config) if err := viper.Unmarshal(&cfg); err != nil { fmt.Println("Error parsing of configuration, used default:", err) } cfg = input.Inquire(cfg) if cfg.Storage.MySQL { cfg.Storage.Config.Driver = config.StorageMySQL cfg.Storage.Config.Version = config.StorageMySQLVersion cfg.Storage.Config.Host = config.StorageMySQL cfg.Storage.Config.Port = config.DefaultMySQLPort cfg.Storage.Config.Username = config.StorageMySQL cfg.Storage.Config.Password = config.StorageMySQL cfg.Storage.Config.Property = config.StorageMySQLDefaultProperty } if cfg.Storage.Postgres { cfg.Storage.Config.Driver = config.StoragePostgres cfg.Storage.Config.Version = config.StoragePostgresVersion cfg.Storage.Config.Host = config.StoragePostgres cfg.Storage.Config.Port = config.DefaultPostgresPort cfg.Storage.Config.Username = config.StoragePostgres cfg.Storage.Config.Password = config.StoragePostgres cfg.Storage.Config.Property = config.StoragePostgresDefaultProperty } generator.Run(cfg) }, }
RootCmd represents the base command when called without any subcommands.
Functions ¶
Types ¶
This section is empty.