开发者

how to use protobuf reflection instead of proto.GetProperties?

I'm using proto.GetProperties in "github.com开发者_运维技巧/golang/protobuf@v1.5.2/proto/properties.go" to get the properties of a proto message. But The function "GetProperties" is deprecated:

Deprecated: Use protobuf reflection instead.

SO, how to use protobuf reflection instead of proto.GetProperties?

Does it means to use something in "google.golang.org/protobuf/proto"?

Is there any samples?

My env :

golang : v1.17.5
github.com/golang/protobuf : v1.5.2
google.golang.org/protobuf : v1.28.1
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜