Skip to content

Commit b45b9d4

Browse files
hicqushenli
authored andcommitted
mysqlx: add mysqlx proto files and generate code. (#37)
1 parent 6c28998 commit b45b9d4

22 files changed

+18548
-1
lines changed

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
all: go rust binlog
1+
all: go rust binlog mysqlx
22

33
go:
44
./generate-go.sh
@@ -8,3 +8,6 @@ rust:
88

99
binlog:
1010
./generate-binlog.sh
11+
12+
mysqlx:
13+
./generate-mysqlx.sh

generate-mysqlx.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cd proto
2+
3+
echo "generate go code..."
4+
GOGO_ROOT=${GOPATH}/src/github.com/gogo/protobuf
5+
find ./Mysqlx -name "*.proto" -exec protoc -I.:${GOGO_ROOT}:${GOGO_ROOT}/protobuf --gofast_out=.. {} \;
6+
cd ..
7+
find ./Mysqlx -name "*.pb.go" -exec sed -i -E 's/import _ \"gogoproto\"//g' {} \;
8+
find ./Mysqlx -name "*.pb.go" -exec sed -i -E 's/import fmt \"fmt\"//g' {} \;
9+
find ./Mysqlx -name "*.pb.go" -exec sed -i -E 's/Mysqlx\//github.com\/pingcap\/tipb\/go-mysqlx\//g' {} \;
10+
find ./Mysqlx -name "*.pb.go" -exec goimports -w {} \;
11+
rm -rf go-mysqlx && mv Mysqlx go-mysqlx

0 commit comments

Comments
 (0)