Jelajahi Sumber

descriptor: rename generated protobuf package on import.

This works around https://github.com/google/go-genproto/issues/8,
renaming the local package to match its expected name.
Bryan C. Mills 9 tahun lalu
induk
melakukan
8ee7999722
2 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 1 1
      descriptor/descriptor.go
  2. 1 1
      descriptor/descriptor_test.go

+ 1 - 1
descriptor/descriptor.go

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

+ 1 - 1
descriptor/descriptor_test.go

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