File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/DataBridgeTech/dbqctl
33go 1.24.5
44
55require (
6- github.com/DataBridgeTech/dbqcore v0.0.6
6+ github.com/DataBridgeTech/dbqcore v0.0.8
77 github.com/spf13/cobra v1.9.1
88 github.com/spf13/pflag v1.0.7
99 github.com/spf13/viper v1.20.1
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import (
1818 "fmt"
1919 "log/slog"
2020 "os"
21- "strings"
2221
2322 "github.com/DataBridgeTech/dbqcore"
2423
@@ -157,12 +156,11 @@ func initConfig(dbqConfigPath string) (*dbqcore.DbqConfig, string) {
157156}
158157
159158func getDbqConnector (ds dbqcore.DataSource , logLevel slog.Level ) (dbqcore.DbqConnector , error ) {
160- dsType := strings .ToLower (ds .Type )
161159 logHandler := slog .NewTextHandler (os .Stdout , & slog.HandlerOptions {Level : logLevel })
162- switch dsType {
163- case "clickhouse" :
160+ switch ds . Type {
161+ case dbqcore . DataSourceTypeClickhouse :
164162 return dbqcore .NewClickhouseDbqConnector (ds , slog .New (logHandler ))
165163 default :
166- return nil , fmt .Errorf ("data source type '%s' is not supported" , dsType )
164+ return nil , fmt .Errorf ("data source type '%s' is not supported" , ds . Type )
167165 }
168166}
You can’t perform that action at this time.
0 commit comments