We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
simple test program.
➜ gotest cat main.go package main // import "tt" import ( "fmt" "github.com/pingcap/parser" _ "github.com/pingcap/tidb/types/parser_driver" ) func main() { sql := "select 1" p := parser.New() node, err := p.ParseOneStmt(sql, "", "") if err != nil { fmt.Printf("parse one statement error: %s", sql) return } }
go mod init
➜ gotest cat go.mod module tt require ( github.com/golang/protobuf v1.2.0 // indirect github.com/pingcap/errors v0.11.0 // indirect github.com/pingcap/parser v0.0.0-20190120153311-05caf0a5ea61 github.com/pingcap/tidb v2.0.11+incompatible // indirect github.com/pingcap/tipb v0.0.0-20190107072121-abbec73437b7 // indirect github.com/sirupsen/logrus v1.3.0 // indirect golang.org/x/text v0.3.0 // indirect )
go build
➜ gotest go build go: finding github.com/pingcap/parser latest go: finding github.com/pingcap/tidb/types/parser_driver latest go: finding github.com/pingcap/tidb/types latest go: finding github.com/pingcap/tidb/util/hack latest go: finding github.com/pingcap/tidb/util latest go: finding github.com/pingcap/tipb/go-tipb latest go: finding github.com/pingcap/tipb latest go: finding golang.org/x/text/encoding/japanese latest go: finding golang.org/x/text/encoding/unicode latest go: finding golang.org/x/text/encoding/traditionalchinese latest go: finding golang.org/x/text/encoding/korean latest go: finding golang.org/x/text/encoding latest go: finding golang.org/x/text/encoding/charmap latest go: finding golang.org/x/text/encoding/simplifiedchinese latest go: finding github.com/golang/protobuf/proto latest main.go:8:2: unknown import path "github.com/pingcap/tidb/types/parser_driver": cannot find module providing package github.com/pingcap/tidb/types/parser_driver
why the go.mod in this repository named go.mod1?
The text was updated successfully, but these errors were encountered:
Manually change this line in go.mod
github.com/pingcap/tidb v2.0.11+incompatible // indirect
to
github.com/pingcap/tidb v0.0.0-20190108123336-c68ee7318319
Or, you can specify a tidb version via:
GO111MODULE=on go get -u github.com/pingcap/tidb@5f8265a8f9bebc6d61c18d1e7c0aabb493ef2c41
@s7v7nislands
Sorry, something went wrong.
It works! Thanks! Can you explain why should change that?
Ref pingcap/tidb#16381
compile issue refer to pingcap/parser#187
f488803
No branches or pull requests
simple test program.
go mod init
go build
why the go.mod in this repository named go.mod1?
The text was updated successfully, but these errors were encountered: