-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
google.protobuf.Empty 生成异常问题。 #1009
Comments
github-actions
bot
added
the
invalid issue
invalid issue (not related to Hertz or described in document or not enough information provided)
label
Nov 28, 2023
This issue has been marked as invalid question, please give more information by following the |
li-jin-gou
added
question
Further information is requested
and removed
invalid issue
invalid issue (not related to Hertz or described in document or not enough information provided)
stale
labels
Nov 28, 2023
proto位置:./idl/pc/pc_service.proto |
目前工具没有对 protobuf 的 WKT 类型做特殊的适配处理,这块你先手动修改下 import 吧。之后有时间我给这块的处理统一加上 |
每次update都会重新出现 |
或者目前可以先将 empty 等 wkt 类型封装到一个 message 里 |
明白了,这个什么时候更新呢? |
我先排一个任务,需要梳理下支持 wkt 类型需不需要其他的一些操作 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
import "google/protobuf/empty.proto";
service ClientService {
rpc Stat(google.protobuf.Empty) returns(common.BaseRespBody) {
option (api.get) = "/client/stat";
}
}
服务里面使用了google.protobuf.Empty,然后通过hz工具生成go文件,handler文件里面生成了诡异的
emptypb "turing/biz/model/google.golang.org/protobuf/types/known/emptypb"
To Reproduce
Steps to reproduce the behavior:
Expected behavior
google.protobuf.Empty应该被生成为emptypb "google.golang.org/protobuf/types/known/emptypb"
Screenshots
If applicable, add screenshots to help explain your problem.
Hertz version:
v0.7.1
Environment:
require (
github.com/cloudwego/hertz v0.7.2
github.com/go-redis/redis/v7 v7.4.1
github.com/hertz-contrib/jwt v1.0.2
github.com/hertz-contrib/logger/logrus v1.0.0
github.com/sirupsen/logrus v1.9.3
github.com/spf13/viper v1.17.0
google.golang.org/protobuf v1.31.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
gorm.io/driver/mysql v1.5.2
gorm.io/gorm v1.25.5
gorm.io/plugin/dbresolver v1.5.0
)
Additional context
平台:win11
The text was updated successfully, but these errors were encountered: