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
精彩评论