Skip to content

Commit 96d95dd

Browse files
committed
Fix typos
1 parent 03df6c1 commit 96d95dd

34 files changed

Lines changed: 73 additions & 73 deletions

File tree

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
@@ -236,7 +236,7 @@ func generateRemoteProtos() {
236236

237237
// Benchmark protos.
238238
// TODO: The protobuf repo no longer includes benchmarks.
239-
// CL removing them says they are superceded by google/fleetbench:
239+
// CL removing them says they are superseded by google/fleetbench:
240240
// https://github.com/protocolbuffers/protobuf/commit/83c499de86224538e5d59adc3d0fa7fdb45b2c72
241241
// But that project's proto benchmark files are very different:
242242
// https://github.com/google/fleetbench/tree/main/fleetbench/proto

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.

internal/encoding/tag/tag.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func Marshal(fd protoreflect.FieldDescriptor, enumName string) string {
179179
}
180180
tag = append(tag, "name="+name)
181181
if jsonName := fd.JSONName(); jsonName != "" && jsonName != name && !fd.IsExtension() {
182-
// NOTE: The jsonName != name condition is suspect, but it preserve
182+
// NOTE: The jsonName != name condition is suspect, but it preserves
183183
// the exact same semantics from the previous generator.
184184
tag = append(tag, "json="+jsonName)
185185
}

internal/encoding/text/decode.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ func (d *Decoder) parseNext(lastKind Kind) (Token, error) {
335335

336336
case ListOpen:
337337
if lastKind == semicolon {
338-
// It is not be possible to have this case as logic here
338+
// It is not possible to have this case as logic here
339339
// should not have produced a semicolon Token when inside a
340340
// list. Let it panic below.
341341
break

internal/encoding/text/decode_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ func TestDecoder(t *testing.T) {
526526
},
527527
},
528528
{
529-
// Whitespaces/comments are only allowed betweeb
529+
// Whitespaces/comments are only allowed between
530530
in: "[" + space + "domain" + space + "." + space + "com # comment\n" +
531531
"/" + "pkg" + space + "." + space + "type" + space + "]",
532532
want: []R{

internal/filedesc/build.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// Package filedesc provides functionality for constructing descriptors.
66
//
77
// The types in this package implement interfaces in the protoreflect package
8-
// related to protobuf descripriptors.
8+
// related to protobuf descriptors.
99
package filedesc
1010

1111
import (
@@ -40,7 +40,7 @@ type Builder struct {
4040
protoregistry.ExtensionTypeResolver
4141
}
4242

43-
// FileRegistry is use to lookup file, enum, and message dependencies.
43+
// FileRegistry is used to lookup file, enum, and message dependencies.
4444
// Once constructed, the file descriptor is registered here.
4545
// If nil, it uses protoregistry.GlobalFiles.
4646
FileRegistry interface {

0 commit comments

Comments
 (0)