Moved to google.golang.org/genproto/googleapis/api/annotations

Fixes #52
This commit is contained in:
Valerio Gheri
2017-03-31 18:01:58 +02:00
parent 024c5a4e4e
commit c40779224f
2037 changed files with 831329 additions and 1854 deletions

View File

@@ -43,7 +43,7 @@ import (
"io/ioutil"
"github.com/golang/protobuf/proto"
protobuf "google.golang.org/genproto/protobuf"
protobuf "github.com/golang/protobuf/protoc-gen-go/descriptor"
)
// extractFile extracts a FileDescriptorProto from a gzip'd buffer.

View File

@@ -6,7 +6,7 @@ import (
"github.com/golang/protobuf/descriptor"
tpb "github.com/golang/protobuf/proto/testdata"
protobuf "google.golang.org/genproto/protobuf"
protobuf "github.com/golang/protobuf/protoc-gen-go/descriptor"
)
func TestMessage(t *testing.T) {

View File

@@ -45,9 +45,9 @@ my_test/test.pb.go: my_test/test.proto
golden:
make -B my_test/test.pb.go
sed -i '/return.*fileDescriptor/d' my_test/test.pb.go
sed -i '/^var fileDescriptor/,/^}/d' my_test/test.pb.go
sed -i '/proto.RegisterFile.*fileDescriptor/d' my_test/test.pb.go
sed -i -e '/return.*fileDescriptor/d' my_test/test.pb.go
sed -i -e '/^var fileDescriptor/,/^}/d' my_test/test.pb.go
sed -i -e '/proto.RegisterFile.*fileDescriptor/d' my_test/test.pb.go
gofmt -w my_test/test.pb.go
diff -w my_test/test.pb.go my_test/test.pb.go.golden

View File

@@ -319,7 +319,7 @@ func (m *Reply) GetCompactKeys() []int32 {
type Reply_Entry struct {
KeyThatNeeds_1234Camel_CasIng *int64 `protobuf:"varint,1,req,name=key_that_needs_1234camel_CasIng,json=keyThatNeeds1234camelCasIng" json:"key_that_needs_1234camel_CasIng,omitempty"`
Value *int64 `protobuf:"varint,2,opt,name=value,def=7" json:"value,omitempty"`
XMyFieldName_2 *int64 `protobuf:"varint,3,opt,name=_my_field_name_2,json=myFieldName2" json:"_my_field_name_2,omitempty"`
XMyFieldName_2 *int64 `protobuf:"varint,3,opt,name=_my_field_name_2,json=MyFieldName2" json:"_my_field_name_2,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
@@ -389,6 +389,7 @@ var E_ReplyExtensions_Time = &proto.ExtensionDesc{
Field: 101,
Name: "my.test.ReplyExtensions.time",
Tag: "fixed64,101,opt,name=time",
Filename: "my_test/test.proto",
}
var E_ReplyExtensions_Carrot = &proto.ExtensionDesc{
@@ -397,6 +398,7 @@ var E_ReplyExtensions_Carrot = &proto.ExtensionDesc{
Field: 105,
Name: "my.test.ReplyExtensions.carrot",
Tag: "bytes,105,opt,name=carrot",
Filename: "my_test/test.proto",
}
var E_ReplyExtensions_Donut = &proto.ExtensionDesc{
@@ -405,6 +407,7 @@ var E_ReplyExtensions_Donut = &proto.ExtensionDesc{
Field: 101,
Name: "my.test.ReplyExtensions.donut",
Tag: "bytes,101,opt,name=donut",
Filename: "my_test/test.proto",
}
type OtherReplyExtensions struct {
@@ -832,6 +835,7 @@ var E_Tag = &proto.ExtensionDesc{
Field: 103,
Name: "my.test.tag",
Tag: "bytes,103,opt,name=tag",
Filename: "my_test/test.proto",
}
var E_Donut = &proto.ExtensionDesc{
@@ -840,6 +844,7 @@ var E_Donut = &proto.ExtensionDesc{
Field: 106,
Name: "my.test.donut",
Tag: "bytes,106,opt,name=donut",
Filename: "my_test/test.proto",
}
func init() {

View File

@@ -319,7 +319,7 @@ func (m *Reply) GetCompactKeys() []int32 {
type Reply_Entry struct {
KeyThatNeeds_1234Camel_CasIng *int64 `protobuf:"varint,1,req,name=key_that_needs_1234camel_CasIng,json=keyThatNeeds1234camelCasIng" json:"key_that_needs_1234camel_CasIng,omitempty"`
Value *int64 `protobuf:"varint,2,opt,name=value,def=7" json:"value,omitempty"`
XMyFieldName_2 *int64 `protobuf:"varint,3,opt,name=_my_field_name_2,json=myFieldName2" json:"_my_field_name_2,omitempty"`
XMyFieldName_2 *int64 `protobuf:"varint,3,opt,name=_my_field_name_2,json=MyFieldName2" json:"_my_field_name_2,omitempty"`
XXX_unrecognized []byte `json:"-"`
}
@@ -389,6 +389,7 @@ var E_ReplyExtensions_Time = &proto.ExtensionDesc{
Field: 101,
Name: "my.test.ReplyExtensions.time",
Tag: "fixed64,101,opt,name=time",
Filename: "my_test/test.proto",
}
var E_ReplyExtensions_Carrot = &proto.ExtensionDesc{
@@ -397,6 +398,7 @@ var E_ReplyExtensions_Carrot = &proto.ExtensionDesc{
Field: 105,
Name: "my.test.ReplyExtensions.carrot",
Tag: "bytes,105,opt,name=carrot",
Filename: "my_test/test.proto",
}
var E_ReplyExtensions_Donut = &proto.ExtensionDesc{
@@ -405,6 +407,7 @@ var E_ReplyExtensions_Donut = &proto.ExtensionDesc{
Field: 101,
Name: "my.test.ReplyExtensions.donut",
Tag: "bytes,101,opt,name=donut",
Filename: "my_test/test.proto",
}
type OtherReplyExtensions struct {
@@ -832,6 +835,7 @@ var E_Tag = &proto.ExtensionDesc{
Field: 103,
Name: "my.test.tag",
Tag: "bytes,103,opt,name=tag",
Filename: "my_test/test.proto",
}
var E_Donut = &proto.ExtensionDesc{
@@ -840,6 +844,7 @@ var E_Donut = &proto.ExtensionDesc{
Field: 106,
Name: "my.test.donut",
Tag: "bytes,106,opt,name=donut",
Filename: "my_test/test.proto",
}
func init() {