Wrong package reference in v3
roskyz opened this issue · 0 comments
roskyz commented
Expected Behavior
When I use v3, I get an error on the function norm.MustOpen
import (
"time"
"github.com/zhihu/norm/v3"
"github.com/zhihu/norm/v3/dialectors"
)
func TestNew(t *testing.T) {
dalector := dialectors.MustNewNebulaDialector(dialectors.DialectorConfig{
Addresses: []string{"127.0.0.1:9669"},
Timeout: time.Second * 5,
Space: "test",
Username: "test",
Password: "test",
})
norm.MustOpen(dalector, norm.Config{})
}
Current Behavior
The first parameter of this function is dialectors.IDialector
which is imported from "github.com/zhihu/norm/dialectors"
Possible Solution
Change all imports to "github.com/zhihu/norm/v3"
. i.e. with
diff --git a/internal/converts/query.go b/internal/converts/query.go
index 31214c6..b2162df 100644
--- a/internal/converts/query.go
+++ b/internal/converts/query.go
@@ -4,7 +4,7 @@ import (
"reflect"
"github.com/pkg/errors"
- "github.com/zhihu/norm/dialectors"
+ "github.com/zhihu/norm/v3/dialectors"
)