开发者

how to use protobuf reflection instead of proto.GetProperties?

开发者 https://www.devze.com 2022-12-07 20:44 出处:网络
I\'m using proto.GetProperties in "github.com开发者_运维技巧/golang/protobuf@v1.5.2/proto/properties.go" to get the properties of a proto message.

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

精彩评论

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

关注公众号