From 246af0d153cae8ef4e2915a8d212167ad0751985 Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Wed, 8 Feb 2023 19:19:55 +0200 Subject: [PATCH] internal,reflect: correct typos Fix typos in comments and unexported function name. Change-Id: I239fff85bc68d7f0ef6f8853acdc9bbe19d86304 Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/466535 Reviewed-by: Lasse Folger Reviewed-by: Michael Stapelberg Reviewed-by: Joseph Tsai --- integration_test.go | 2 +- internal/cmd/generate-protos/main.go | 6 +++--- internal/encoding/json/decode.go | 2 +- reflect/protoreflect/value.go | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/integration_test.go b/integration_test.go index 33ac34d76..e73ad24ff 100644 --- a/integration_test.go +++ b/integration_test.go @@ -146,7 +146,7 @@ func Test(t *testing.T) { checks := []string{ "all", // start with all checks enabled "-SA1019", // disable deprecated usage check - "-S*", // disable code simplication checks + "-S*", // disable code simplification checks "-ST*", // disable coding style checks "-U*", // disable unused declaration checks } diff --git a/internal/cmd/generate-protos/main.go b/internal/cmd/generate-protos/main.go index fbb1be90b..37f50d386 100644 --- a/internal/cmd/generate-protos/main.go +++ b/internal/cmd/generate-protos/main.go @@ -53,7 +53,7 @@ func init() { gengo.GenerateVersionMarkers = false gengo.GenerateFile(gen, file) generateIdentifiers(gen, file) - generateSouceContextStringer(gen, file) + generateSourceContextStringer(gen, file) } } gen.SupportedFeatures = gengo.SupportedFeatures @@ -324,10 +324,10 @@ func generateIdentifiers(gen *protogen.Plugin, file *protogen.File) { processMessages(file.Messages) } -// generateSouceContextStringer generates the implementation for the +// generateSourceContextStringer generates the implementation for the // protoreflect.SourcePath.String method by using information present // in the descriptor.proto. -func generateSouceContextStringer(gen *protogen.Plugin, file *protogen.File) { +func generateSourceContextStringer(gen *protogen.Plugin, file *protogen.File) { if file.Desc.Path() != "google/protobuf/descriptor.proto" { return } diff --git a/internal/encoding/json/decode.go b/internal/encoding/json/decode.go index b13fd29e8..d043a6ebe 100644 --- a/internal/encoding/json/decode.go +++ b/internal/encoding/json/decode.go @@ -294,7 +294,7 @@ func (d *Decoder) isValueNext() bool { } // consumeToken constructs a Token for given Kind with raw value derived from -// current d.in and given size, and consumes the given size-lenght of it. +// current d.in and given size, and consumes the given size-length of it. func (d *Decoder) consumeToken(kind Kind, size int) Token { tok := Token{ kind: kind, diff --git a/reflect/protoreflect/value.go b/reflect/protoreflect/value.go index f31981077..37601b781 100644 --- a/reflect/protoreflect/value.go +++ b/reflect/protoreflect/value.go @@ -148,7 +148,7 @@ type Message interface { // be preserved in marshaling or other operations. IsValid() bool - // ProtoMethods returns optional fast-path implementions of various operations. + // ProtoMethods returns optional fast-path implementations of various operations. // This method may return nil. // // The returned methods type is identical to