mirror of
https://github.com/go-kratos/kratos.git
synced 2025-11-06 08:59:18 +02:00
fix(makefile): add "make proto" for proto generating (#2130)
Co-authored-by: Guoqiang Ding <guoqiang10@staff.sina.com.cn>
This commit is contained in:
7
Makefile
7
Makefile
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user