-
Notifications
You must be signed in to change notification settings - Fork 614
Description
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:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
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