Skip to content

Commit 07ea65a

Browse files
committed
dbqcore v0.0.8
1 parent b1e6f36 commit 07ea65a

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/DataBridgeTech/dbqctl
33
go 1.24.5
44

55
require (
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

internal/app.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff 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

159158
func 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
}

0 commit comments

Comments
 (0)