Skip to content

Commit f3078ba

Browse files
committed
update imports to use dbq-core lib
1 parent 10c5b26 commit f3078ba

11 files changed

Lines changed: 29 additions & 17 deletions

File tree

cmd/check.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package cmd
22

33
import (
4-
"dbq/internal"
54
"fmt"
65
"log"
76
"os"
87
"strings"
98

9+
"github.com/DataBridge-Tech/dbq/internal"
1010
"github.com/spf13/cobra"
1111
)
1212

cmd/import.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package cmd
22

33
import (
4-
"dbq/internal"
54
"log"
65

6+
"github.com/DataBridge-Tech/dbq/internal"
77
"github.com/spf13/cobra"
88
)
99

cmd/ping.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
package cmd
22

33
import (
4-
"dbq/internal"
5-
"github.com/spf13/cobra"
64
"log"
5+
6+
"github.com/DataBridge-Tech/dbq/internal"
7+
"github.com/spf13/cobra"
78
)
89

910
func NewPingCommand(app internal.DbqApp) *cobra.Command {

cmd/profile.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package cmd
22

33
import (
4-
"dbq/internal"
54
"encoding/json"
6-
"github.com/spf13/cobra"
75
"log"
6+
7+
"github.com/DataBridge-Tech/dbq/internal"
8+
"github.com/spf13/cobra"
89
)
910

1011
func NewProfileCommand(app internal.DbqApp) *cobra.Command {

cmd/root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package cmd
22

33
import (
4-
"dbq/internal"
54
"log/slog"
65
"os"
76

7+
"github.com/DataBridge-Tech/dbq/internal"
88
"github.com/spf13/cobra"
99
)
1010

cmd/version.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ package cmd
22

33
import (
44
"fmt"
5+
6+
dbqcore "github.com/DataBridge-Tech/dbq-core"
57
"github.com/spf13/cobra"
68
)
79

@@ -15,6 +17,7 @@ func NewVersionCommand() *cobra.Command {
1517
Short: "Prints dbq version",
1618
Run: func(cmd *cobra.Command, args []string) {
1719
fmt.Printf("DataBridge Quality Core: %s\n", DbqVersion)
20+
fmt.Printf("DataBridge Lib Core: %s\n", dbqcore.GetDbqVersion())
1821
},
1922
}
2023

go.mod

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module dbq
1+
module github.com/DataBridge-Tech/dbq
22

33
go 1.24.2
44

@@ -7,8 +7,11 @@ require (
77
github.com/spf13/cobra v1.9.1
88
github.com/spf13/viper v1.20.1
99
gopkg.in/yaml.v3 v3.0.1
10+
github.com/DataBridge-Tech/dbq-core v0.0.1
1011
)
1112

13+
// replace github.com/DataBridge-Tech/dbq-core => ../dbq-core
14+
1215
require (
1316
github.com/ClickHouse/ch-go v0.65.1 // indirect
1417
github.com/andybalholm/brotli v1.1.1 // indirect

internal/app.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ package internal
22

33
import (
44
"fmt"
5-
"github.com/spf13/cobra"
6-
"github.com/spf13/viper"
7-
"gopkg.in/yaml.v3"
85
"log/slog"
96
"os"
107
"strings"
8+
9+
"github.com/spf13/cobra"
10+
"github.com/spf13/viper"
11+
"gopkg.in/yaml.v3"
1112
)
1213

1314
type DbqApp interface {

internal/checks_config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package internal
22

33
import (
4-
"gopkg.in/yaml.v3"
54
"os"
5+
6+
"gopkg.in/yaml.v3"
67
)
78

89
type OnFailAction string

internal/clickhouse.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ import (
44
"context"
55
"database/sql"
66
"fmt"
7-
"github.com/ClickHouse/clickhouse-go/v2"
8-
"github.com/ClickHouse/clickhouse-go/v2/lib/driver"
97
"log"
108
"log/slog"
119
"reflect"
1210
"regexp"
1311
"strings"
1412
"time"
13+
14+
"github.com/ClickHouse/clickhouse-go/v2"
15+
"github.com/ClickHouse/clickhouse-go/v2/lib/driver"
1516
)
1617

1718
type ClickhouseDbqConnector struct {

0 commit comments

Comments
 (0)