goprotobuf: Changes for new struct tag format.
Protocol messages have changed their struct tags from
"PB(...)"
to
`protobuf:"..."`
The format represented by "..." is unchanged.
Regenerate {descriptor,plugin}.pb.go files at the same time.
R=r, rsc
CC=golang-dev
http://codereview.appspot.com/4654077
diff --git a/proto/lib.go b/proto/lib.go
index 1d7ed89..6afad34 100644
--- a/proto/lib.go
+++ b/proto/lib.go
@@ -101,10 +101,10 @@
}
type Test struct {
- Label *string "PB(bytes,1,req,name=label)"
- Type *int32 "PB(varint,2,opt,name=type,def=77)"
- Reps []int64 "PB(varint,3,rep,name=reps)"
- Optionalgroup *Test_OptionalGroup "PB(group,4,opt,name=optionalgroup)"
+ Label *string `protobuf:"bytes,1,req,name=label"`
+ Type *int32 `protobuf:"varint,2,opt,name=type,def=77"`
+ Reps []int64 `protobuf:"varint,3,rep,name=reps"`
+ Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=optionalgroup"`
XXX_unrecognized []byte
}
func (this *Test) Reset() {
@@ -113,7 +113,7 @@
const Default_Test_Type int32 = 77
type Test_OptionalGroup struct {
- RequiredField *string "PB(bytes,5,req)"
+ RequiredField *string `protobuf:"bytes,5,req"`
XXX_unrecognized []byte
}
func (this *Test_OptionalGroup) Reset() {