diff --git a/Makefile b/Makefile index 842c95625..843fceb41 100644 --- a/Makefile +++ b/Makefile @@ -76,4 +76,9 @@ test-coverage: .PHONY: lint lint: $(LINTER) @${TOOLS_SHELL} lint - @echo "lint check finished" \ No newline at end of file + @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 diff --git a/api/metadata/server.go b/api/metadata/server.go index 50f90f61e..96f0e1e67 100644 --- a/api/metadata/server.go +++ b/api/metadata/server.go @@ -20,9 +20,6 @@ import ( 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 type Server struct { UnimplementedMetadataServer diff --git a/errors/errors.go b/errors/errors.go index e6bebbf8b..fd95ff3b7 100644 --- a/errors/errors.go +++ b/errors/errors.go @@ -9,8 +9,6 @@ import ( "google.golang.org/grpc/status" ) -//go:generate protoc -I. --go_out=paths=source_relative:. errors.proto - const ( // UnknownCode is unknown code for error info. UnknownCode = 500