зеркало из https://github.com/github/vitess-gh.git
[vtctldclient] Restructure code organization for doing codegen on a local client
Signed-off-by: Andrew Mason <amason@slack-corp.com>
This commit is contained in:
Родитель
1e12b5b46f
Коммит
88053fcbfa
4
Makefile
4
Makefile
|
@ -126,8 +126,8 @@ install-testing: build
|
|||
mkdir -p "$${PREFIX}/web/vtctld2"
|
||||
cp -R web/vtctld2/app "$${PREFIX}/web/vtctld2"
|
||||
|
||||
grpcvtctldclient: go/vt/proto/vtctlservice/vtctlservice.pb.go
|
||||
make -C go/vt/vtctl/grpcvtctldclient
|
||||
vtctldclient: go/vt/proto/vtctlservice/vtctlservice.pb.go
|
||||
make -C go/vt/vtctl/vtctldclient
|
||||
|
||||
parser:
|
||||
make -C go/vt/sqlparser
|
||||
|
|
|
@ -35,7 +35,7 @@ type gRPCVtctldClient struct {
|
|||
c vtctlservicepb.VtctldClient
|
||||
}
|
||||
|
||||
//go:generate -command grpcvtctldclient go run ./codegen
|
||||
//go:generate -command grpcvtctldclient go run ../vtctldclient/codegen
|
||||
//go:generate grpcvtctldclient -out client_gen.go
|
||||
|
||||
func gRPCVtctldClientFactory(addr string) (vtctldclient.VtctldClient, error) {
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
|
||||
MAKEFLAGS = -s
|
||||
|
||||
generate:
|
||||
go generate ./...
|
||||
gofmt -w client_gen.go
|
||||
all: grpcvtctldclient
|
||||
|
||||
grpcvtctldclient:
|
||||
go generate ../$@/...
|
||||
gofmt -w ../$@/client_gen.go
|
Загрузка…
Ссылка в новой задаче