diff options
author | Oleksandr Redko <oleksandr.red+github@gmail.com> | 2023-02-08 19:19:55 +0200 |
---|---|---|
committer | Michael Stapelberg <stapelberg@google.com> | 2023-02-09 09:27:51 +0000 |
commit | 246af0d153cae8ef4e2915a8d212167ad0751985 (patch) | |
tree | 0124723a08e6c294affc0ac84026d0ea9f9e1ada | |
parent | 49eaa78c6c9cc759b5ac50b64249247f393e9bdd (diff) | |
download | golang-protobuf-246af0d153cae8ef4e2915a8d212167ad0751985.tar.gz |
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 <lassefolger@google.com>
Reviewed-by: Michael Stapelberg <stapelberg@google.com>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
-rw-r--r-- | integration_test.go | 2 | ||||
-rw-r--r-- | internal/cmd/generate-protos/main.go | 6 | ||||
-rw-r--r-- | internal/encoding/json/decode.go | 2 | ||||
-rw-r--r-- | reflect/protoreflect/value.go | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/integration_test.go b/integration_test.go index 33ac34d7..e73ad24f 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 fbb1be90..37f50d38 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 b13fd29e..d043a6eb 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 f3198107..37601b78 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 |