fix(makefile): add "make proto" for proto generating (#2130)

Co-authored-by: Guoqiang Ding <guoqiang10@staff.sina.com.cn>
pull/2367/head
Guoqiang Ding 2 years ago committed by GitHub
parent e176ddfcdd
commit 667d63839c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      Makefile
  2. 3
      api/metadata/server.go
  3. 2
      errors/errors.go

@ -76,4 +76,9 @@ test-coverage:
.PHONY: lint .PHONY: lint
lint: $(LINTER) lint: $(LINTER)
@${TOOLS_SHELL} lint @${TOOLS_SHELL} lint
@echo "lint check finished" @echo "lint check finished"
.PHONY: proto
proto:
protoc --proto_path=./api --proto_path=./third_party --go_out=paths=source_relative:./api --go-grpc_out=paths=source_relative:./api --go-http_out=paths=source_relative:./api metadata/metadata.proto
protoc --proto_path=./third_party --go_out=paths=source_relative:./ errors/errors.proto

@ -20,9 +20,6 @@ import (
dpb "google.golang.org/protobuf/types/descriptorpb" dpb "google.golang.org/protobuf/types/descriptorpb"
) )
//nolint:lll
//go:generate protoc --proto_path=. --proto_path=../../third_party --go_out=paths=source_relative:. --go-grpc_out=paths=source_relative:. --go-http_out=paths=source_relative:. metadata.proto
// Server is api meta server // Server is api meta server
type Server struct { type Server struct {
UnimplementedMetadataServer UnimplementedMetadataServer

@ -9,8 +9,6 @@ import (
"google.golang.org/grpc/status" "google.golang.org/grpc/status"
) )
//go:generate protoc -I. --go_out=paths=source_relative:. errors.proto
const ( const (
// UnknownCode is unknown code for error info. // UnknownCode is unknown code for error info.
UnknownCode = 500 UnknownCode = 500

Loading…
Cancel
Save