Skip to content

Commit f1f75cd

Browse files
committed
all: fix typos
Change-Id: I90c7beff6f065b9348d516ff2cd6d0bd0379d516
1 parent ce4fa19 commit f1f75cd

File tree

73 files changed

+2644
-2641
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+2644
-2641
lines changed

cmd/protoc-gen-go/internal_gengo/well_known_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ func genMessageKnownFunctions(g *protogen.GeneratedFile, f *fileInfo, m *message
10241024
g.P()
10251025

10261026
g.P("// hasPathPrefix is like strings.HasPrefix, but further checks for either")
1027-
g.P("// an exact matche or that the prefix is delimited by a dot.")
1027+
g.P("// an exact match or that the prefix is delimited by a dot.")
10281028
g.P("func hasPathPrefix(path, prefix string) bool {")
10291029
g.P(" return ", stringsPackage.Ident("HasPrefix"), "(path, prefix) && (len(path) == len(prefix) || path[len(prefix)] == '.')")
10301030
g.P("}")

compiler/protogen/protogen_opaque.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func opaqueNewMessageHook(message *Message) {
2121
// New name mangling scheme: Add a '_' between method base
2222
// name (Get, Set, Clear etc) and original field name if
2323
// needed. As a special case, there is one globally reserved
24-
// name, e.g. "Build" thet still results in actual renaming of
24+
// name, e.g. "Build" that still results in actual renaming of
2525
// the builder field like in the old scheme. We begin by
2626
// taking care of this special case.
2727
for _, field := range message.Fields {
@@ -45,7 +45,7 @@ func opaqueNewMessageHook(message *Message) {
4545
camelCases[field.camelCase] = true
4646

4747
}
48-
// For each field, check if any of it's methods would clash with an original field name
48+
// For each field, check if any of its methods would clash with an original field name
4949
for _, field := range message.Fields {
5050
// Every field (except the union fields, that are taken care of separately) has
5151
// a Get and a Set method.

encoding/protojson/encode.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func (m unpopulatedFieldRanger) Range(f func(protoreflect.FieldDescriptor, proto
212212
for i := 0; i < fds.Len(); i++ {
213213
fd := fds.Get(i)
214214
if m.Has(fd) || fd.ContainingOneof() != nil {
215-
continue // ignore populated fields and fields within a oneofs
215+
continue // ignore populated fields and fields within a oneof
216216
}
217217

218218
v := m.Get(fd)

encoding/protojson/fuzz_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ func roundTripAndCompareProto(t *testing.T, wireBytes []byte, messages ...proto.
6464

6565
jsonBytes, err := protojson.Marshal(src)
6666
if err != nil {
67-
t.Errorf("failed to marshal messsage to json: %v\nmessage: %v", err, src)
67+
t.Errorf("failed to marshal message to json: %v\nmessage: %v", err, src)
6868
}
6969
dst := msg.ProtoReflect().Type().New().Interface()
7070

7171
if err := protojson.Unmarshal(jsonBytes, dst); err != nil {
72-
t.Errorf("failed to unmarshal messsage from json: %v\njson: %s", err, jsonBytes)
72+
t.Errorf("failed to unmarshal message from json: %v\njson: %s", err, jsonBytes)
7373
}
7474

7575
// The cmp package does not deal with NaN on its own and will report

encoding/protojson/well_known_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func wellKnownTypeMarshaler(name protoreflect.FullName) marshalFunc {
6060

6161
type unmarshalFunc func(decoder, protoreflect.Message) error
6262

63-
// wellKnownTypeUnmarshaler returns a unmarshal function if the message type
63+
// wellKnownTypeUnmarshaler returns an unmarshal function if the message type
6464
// has specialized serialization behavior. It returns nil otherwise.
6565
func wellKnownTypeUnmarshaler(name protoreflect.FullName) unmarshalFunc {
6666
if name.Parent() == genid.GoogleProtobuf_package {

encoding/prototext/fuzz_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ func roundTripAndCompareProto(t *testing.T, wireBytes []byte, messages ...proto.
6464

6565
textFormat, err := prototext.Marshal(src)
6666
if err != nil {
67-
t.Errorf("failed to marshal messsage to text format: %v\nmessage: %v", err, src)
67+
t.Errorf("failed to marshal message to text format: %v\nmessage: %v", err, src)
6868
}
6969
dst := msg.ProtoReflect().Type().New().Interface()
7070

7171
if err := (prototext.Unmarshal(textFormat, dst)); err != nil {
72-
t.Errorf("failed to unmarshal messsage from text format: %v\ntext format: %s", err, textFormat)
72+
t.Errorf("failed to unmarshal message from text format: %v\ntext format: %s", err, textFormat)
7373
}
7474

7575
// The cmp package does not deal with NaN on its own and will report

encoding/protowire/wire_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type (
5252
}
5353
appendRaw []byte
5454

55-
// consumeOp represents an Consume operation.
55+
// consumeOp represents a Consume operation.
5656
consumeOp = any
5757
consumeField struct {
5858
wantNum Number

internal/cmd/generate-protos/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ func generateRemoteProtos() {
421421

422422
// Benchmark protos.
423423
// TODO: The protobuf repo no longer includes benchmarks.
424-
// CL removing them says they are superceded by google/fleetbench:
424+
// CL removing them says they are superseded by google/fleetbench:
425425
// https://github.com/protocolbuffers/protobuf/commit/83c499de86224538e5d59adc3d0fa7fdb45b2c72
426426
// But that project's proto benchmark files are very different:
427427
// https://github.com/google/fleetbench/tree/main/fleetbench/proto

internal/cmd/generate-types/proto.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ func (g GoType) NullableStar() Expr {
104104
return "*"
105105
}
106106

107-
// OpaqueNullablePointerMethod is the "internal/impl".pointer method used to access a opaque nullable pointer to this type.
107+
// OpaqueNullablePointerMethod is the "internal/impl".pointer method used to access an opaque nullable pointer to this type.
108108
func (g GoType) OpaqueNullablePointerMethod() Expr {
109109
switch g {
110110
case GoString:
@@ -117,7 +117,7 @@ func (g GoType) OpaqueNullablePointerMethod() Expr {
117117

118118
}
119119

120-
// OpaqueNullableStar is the prefix for dereferencing a opaque nullable value of this type.
120+
// OpaqueNullableStar is the prefix for dereferencing an opaque nullable value of this type.
121121
func (g GoType) OpaqueNullableStar() Expr {
122122
if g == GoString {
123123
return "*" // Strings have indirection even in opaque

internal/conformance/failing_tests_text_format.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Recommended.Editions_Proto3.ProtobufInput.MessageUnknownFields_Print.TextFormatOutput # TEXT_FORMAT output we received from test was unparseable.
1+
Recommended.Editions_Proto3.ProtobufInput.MessageUnknownFields_Print.TextFormatOutput # TEXT_FORMAT output we received from test was unparsable.
22
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogatePairBytes # Should have failed to parse, but didn't.
33
Recommended.Editions_Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogatePairString # Should have failed to parse, but didn't.
44
Recommended.Editions_Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongShortBytes # Should have failed to parse, but didn't.
55
Recommended.Editions_Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongShortString # Should have failed to parse, but didn't.
6-
Recommended.Proto3.ProtobufInput.MessageUnknownFields_Print.TextFormatOutput # TEXT_FORMAT output we received from test was unparseable.
6+
Recommended.Proto3.ProtobufInput.MessageUnknownFields_Print.TextFormatOutput # TEXT_FORMAT output we received from test was unparsable.
77
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogatePairBytes # Should have failed to parse, but didn't.
88
Recommended.Proto3.TextFormatInput.StringLiteralShortUnicodeEscapeSurrogatePairString # Should have failed to parse, but didn't.
99
Recommended.Proto3.TextFormatInput.StringLiteralUnicodeEscapeSurrogatePairLongShortBytes # Should have failed to parse, but didn't.

0 commit comments

Comments
 (0)