fix(grpc): 更新 gRPC 用户客户端路径引用
- 修改 user_client.go 中的 gRPC 用户客户端路径引用,使用相对路径以避免对 grpc 目录的修改。 - 移除 go.mod 中关于 grpc/user/userv1 的本地模块使用说明,简化依赖管理。
This commit is contained in:
parent
ccf52e4684
commit
ef9f366a29
|
|
@ -26,6 +26,5 @@ require (
|
|||
google.golang.org/protobuf v1.32.0 // indirect
|
||||
)
|
||||
|
||||
// 使用本地 grpc 生成的代码
|
||||
// 注意:grpc/user/userv1 目录下的代码需要作为本地模块使用
|
||||
// 使用本地 grpc 生成的代码(不修改 grpc 目录)
|
||||
replace grpc/user/userv1 => ../grpc/user/userv1
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import (
|
|||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/grpc/keepalive"
|
||||
|
||||
// 使用生成的 proto 代码
|
||||
// 使用生成的 proto 代码(通过 go.mod replace 指向本地目录,不修改 grpc 目录)
|
||||
userv1 "grpc/user/userv1"
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue