Skip to content

Commit 75de7c0

Browse files
authored
Merge pull request #1597 from golang/updatedesc
all: update descriptor.proto to latest version
2 parents 5d5e8c0 + b7697bb commit 75de7c0

File tree

10 files changed

+146
-10
lines changed

10 files changed

+146
-10
lines changed

.github/workflows/test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
test:
55
strategy:
66
matrix:
7-
go-version: [1.11.x, 1.12.x, 1.13.x, 1.14.x, 1.15.x, 1.16.x]
7+
go-version: [1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x]
88
os: [ubuntu-latest, macos-latest]
99
runs-on: ${{ matrix.os }}
1010
steps:
@@ -15,8 +15,8 @@ jobs:
1515
- name: Checkout code
1616
uses: actions/checkout@v2
1717
- name: TestLatest
18-
if: matrix.go-version == '1.16.x'
18+
if: matrix.go-version == '1.21.x'
1919
run: ./test.bash
2020
- name: TestAll
21-
if: matrix.go-version != '1.16.x'
21+
if: matrix.go-version != '1.21.x'
2222
run: go test ./...

go.mod

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// Deprecated: Use the "google.golang.org/protobuf" module instead.
22
module github.com/golang/protobuf
33

4-
go 1.9
4+
go 1.17
55

66
require (
77
github.com/google/go-cmp v0.5.5
8-
google.golang.org/protobuf v1.26.0
8+
google.golang.org/protobuf v1.33.0
99
)

go.sum

+2
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
66
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
77
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
88
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
9+
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
10+
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=

jsonpb/decode.go

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ type Unmarshaler struct {
5656
// implement JSONPBMarshaler so that the custom format can be produced.
5757
//
5858
// The JSON unmarshaling must follow the JSON to proto specification:
59+
//
5960
// https://developers.google.com/protocol-buffers/docs/proto3#json
6061
//
6162
// Deprecated: Custom types should implement protobuf reflection instead.

jsonpb/encode.go

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ type Marshaler struct {
5555
// implement JSONPBUnmarshaler so that the custom format can be parsed.
5656
//
5757
// The JSON marshaling must follow the proto to JSON specification:
58+
//
5859
// https://developers.google.com/protocol-buffers/docs/proto3#json
5960
//
6061
// Deprecated: Custom types should implement protobuf reflection instead.

protoc-gen-go/descriptor/descriptor.pb.go

+126-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

protoc-gen-go/generator/generator.go

+2
Original file line numberDiff line numberDiff line change
@@ -1434,6 +1434,7 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) {
14341434
// The tag is a string like "varint,2,opt,name=fieldname,def=7" that
14351435
// identifies details of the field for the protocol buffer marshaling and unmarshaling
14361436
// code. The fields are:
1437+
//
14371438
// wire encoding
14381439
// protocol tag number
14391440
// opt,req,rep for optional, required, or repeated
@@ -1442,6 +1443,7 @@ func (g *Generator) generateEnum(enum *EnumDescriptor) {
14421443
// enum= the name of the enum type if it is an enum-typed field.
14431444
// proto3 if this field is in a proto3 message
14441445
// def= string representation of the default value, if any.
1446+
//
14451447
// The default value must be in a representation that can be used at run-time
14461448
// to generate the default value. Thus bools become 0 and 1, for instance.
14471449
func (g *Generator) goTag(message *Descriptor, field *descriptor.FieldDescriptorProto, wiretype string) string {

protoc-gen-go/main.go

+4
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,21 @@
55
// protoc-gen-go is a plugin for the Google protocol buffer compiler to generate
66
// Go code. Install it by building this program and making it accessible within
77
// your PATH with the name:
8+
//
89
// protoc-gen-go
910
//
1011
// The 'go' suffix becomes part of the argument for the protocol compiler,
1112
// such that it can be invoked as:
13+
//
1214
// protoc --go_out=paths=source_relative:. path/to/file.proto
1315
//
1416
// This generates Go bindings for the protocol buffer defined by file.proto.
1517
// With that input, the output will be written to:
18+
//
1619
// path/to/file.pb.go
1720
//
1821
// See the README and documentation for protocol buffers to learn more:
22+
//
1923
// https://developers.google.com/protocol-buffers/
2024
package main
2125

protoc-gen-go/plugin/plugin.pb.go

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ptypes/any.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,10 @@ func Is(any *anypb.Any, m proto.Message) bool {
127127
// The allocated message is stored in the embedded proto.Message.
128128
//
129129
// Example:
130-
// var x ptypes.DynamicAny
131-
// if err := ptypes.UnmarshalAny(a, &x); err != nil { ... }
132-
// fmt.Printf("unmarshaled message: %v", x.Message)
130+
//
131+
// var x ptypes.DynamicAny
132+
// if err := ptypes.UnmarshalAny(a, &x); err != nil { ... }
133+
// fmt.Printf("unmarshaled message: %v", x.Message)
133134
//
134135
// Deprecated: Use the any.UnmarshalNew method instead to unmarshal
135136
// the any message contents into a new instance of the underlying message.

0 commit comments

Comments
 (0)