File tree Expand file tree Collapse file tree 3 files changed +4
-12
lines changed Expand file tree Collapse file tree 3 files changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,4 @@ module github.com/golang/protobuf
2
2
3
3
go 1.9
4
4
5
- require google.golang.org/protobuf v0.0.0-20190617173324-378c1329ded0
5
+ require google.golang.org/protobuf v0.0.0-20190617175724-bd7b7a9e0c26
Original file line number Diff line number Diff line change @@ -12,5 +12,5 @@ google.golang.org/protobuf v0.0.0-20190516201745-40b83d67fc75/go.mod h1:jf+u8AHu
12
12
google.golang.org/protobuf v0.0.0-20190516215540-a95b29fbf623 /go.mod h1:cWWmz5lsCWIcqGLROrKq5Lu231IJw2PzqOZ8cgspbfY =
13
13
google.golang.org/protobuf v0.0.0-20190522194032-21ade498bd69 /go.mod h1:cJytyYi/6qdwy/+gD49hmgHcwD7zhWxE/1KPEslaZ3M =
14
14
google.golang.org/protobuf v0.0.0-20190605195314-89d49632e5cf /go.mod h1:Btug4TBaP5wNYcb2zGKDTS7WMcaPPLuqEAKfEAZWYbo =
15
- google.golang.org/protobuf v0.0.0-20190617173324-378c1329ded0 h1:xWgajdfLzmZPasRoZwpEGv4W/ouKCE33vYT9lIhwXTI =
16
- google.golang.org/protobuf v0.0.0-20190617173324-378c1329ded0 /go.mod h1:+FOB8T5/Yw4ywwdyeun9/KlDeuwFYBkNQ+kVuwj9C94 =
15
+ google.golang.org/protobuf v0.0.0-20190617175724-bd7b7a9e0c26 h1:TNW9FO1kBCrRCRWMg37SPUITvx76qDVlAja8TSVvX4c =
16
+ google.golang.org/protobuf v0.0.0-20190617175724-bd7b7a9e0c26 /go.mod h1:+FOB8T5/Yw4ywwdyeun9/KlDeuwFYBkNQ+kVuwj9C94 =
Original file line number Diff line number Diff line change @@ -78,11 +78,7 @@ func FileDescriptor(s filePath) (d fileDescGZIP) {
78
78
}
79
79
80
80
// Find the descriptor in the v2 registry.
81
- var n int
82
- protoregistry .GlobalFiles .RangeFilesByPath (s , func (fd pref.FileDescriptor ) bool {
83
- n ++
84
-
85
- // Convert the structured file descriptor to the raw descriptor proto.
81
+ if fd , _ := protoregistry .GlobalFiles .FindFileByPath (s ); fd != nil {
86
82
pb := protodesc .ToFileDescriptorProto (fd )
87
83
b , err := protoV2 .Marshal (pb )
88
84
if err != nil {
@@ -97,10 +93,6 @@ func FileDescriptor(s filePath) (d fileDescGZIP) {
97
93
panic (fmt .Sprintf ("proto: compression failure: %v" , err ))
98
94
}
99
95
d = bb .Bytes ()
100
- return true
101
- })
102
- if n > 1 {
103
- return d // best-effort; may be non-deterministic
104
96
}
105
97
106
98
// Locally cache the raw descriptor form for the file.
You can’t perform that action at this time.
0 commit comments