fix proto name

This commit is contained in:
daniel.w 2024-08-25 22:07:24 +08:00
parent 5d55ba14a3
commit b1a19ffba7
6 changed files with 8 additions and 8 deletions

3
.gitignore vendored
View File

@ -2,5 +2,6 @@
go.sum go.sum
account/ account/
gen_result/ gen_result/
etc/service.yaml etc/member.yaml
client/ client/
.DS_Store

View File

@ -19,7 +19,7 @@ fmt: # 格式優化
.PHONY: gen-rpc .PHONY: gen-rpc
gen-rpc: # 建立 rpc code gen-rpc: # 建立 rpc code
goctl rpc protoc ./generate/protobuf/service.proto -m --style=$(GO_ZERO_STYLE) --go_out=./gen_result/pb --go-grpc_out=./gen_result/pb --zrpc_out=. goctl rpc protoc ./generate/protobuf/member.proto -m --style=$(GO_ZERO_STYLE) --go_out=./gen_result/pb --go-grpc_out=./gen_result/pb --zrpc_out=.
go mod tidy go mod tidy
@echo "Generate core-api files successfully" @echo "Generate core-api files successfully"

View File

@ -1,5 +1,5 @@
// Code generated by goctl. DO NOT EDIT. // Code generated by goctl. DO NOT EDIT.
// Source: service.proto // Source: member.proto
package server package server

View File

@ -2,8 +2,7 @@ package main
import ( import (
"flag" "flag"
"fmt"
"github.com/zeromicro/go-zero/core/logx"
"app-cloudep-member-server/gen_result/pb/member" "app-cloudep-member-server/gen_result/pb/member"
"app-cloudep-member-server/internal/config" "app-cloudep-member-server/internal/config"
@ -17,7 +16,7 @@ import (
"google.golang.org/grpc/reflection" "google.golang.org/grpc/reflection"
) )
var configFile = flag.String("f", "etc/service.yaml", "the config file") var configFile = flag.String("f", "etc/member.yaml", "the config file")
func main() { func main() {
flag.Parse() flag.Parse()
@ -35,6 +34,6 @@ func main() {
}) })
defer s.Stop() defer s.Stop()
logx.Info("Starting rpc server at %s...\n", c.ListenOn) fmt.Printf("Starting rpc server at %s...\n", c.ListenOn)
s.Start() s.Start()
} }