Skip to content

Commit 6d92899

Browse files
committed
feat: register MySQLProvider at startup via DefaultRegistry
1 parent b44f5ee commit 6d92899

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cmd/root.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ import (
2727
"github.com/ProxySQL/dbdeployer/defaults"
2828
"github.com/ProxySQL/dbdeployer/downloads"
2929
"github.com/ProxySQL/dbdeployer/globals"
30+
"github.com/ProxySQL/dbdeployer/providers"
31+
mysqlprovider "github.com/ProxySQL/dbdeployer/providers/mysql"
3032
"github.com/ProxySQL/dbdeployer/sandbox"
3133
)
3234

@@ -143,6 +145,9 @@ func customizeFlags(cmd *cobra.Command, cmdName string) {
143145
}
144146

145147
func init() {
148+
if err := mysqlprovider.Register(providers.DefaultRegistry); err != nil {
149+
panic(fmt.Sprintf("failed to register MySQL provider: %v", err))
150+
}
146151
cobra.OnInitialize(checkDefaultsFile)
147152
rootCmd.CompletionOptions.DisableDefaultCmd = true
148153
rootCmd.PersistentFlags().StringVar(&defaults.CustomConfigurationFile, globals.ConfigLabel, defaults.ConfigurationFile, "configuration file")

0 commit comments

Comments
 (0)