From aeab76f0befcd6ab1257eae9adb27ac2cb2b7ff8 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Fri, 30 Sep 2022 06:11:15 +0000 Subject: [PATCH] encoding: fix a few function names on comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I17a311afb94a056b3d35bfa241f5d0d206db602d GitHub-Last-Rev: 42129464c9e17fae9b61ea60940e193fcefc5760 GitHub-Pull-Request: golang/go#55962 Reviewed-on: https://go-review.googlesource.com/c/go/+/436882 Reviewed-by: Dmitri Shuralyov Auto-Submit: Dmitri Shuralyov TryBot-Result: Gopher Robot Reviewed-by: Daniel Martí Reviewed-by: Keith Randall Run-TryBot: Daniel Martí Reviewed-by: Rob Pike --- src/encoding/asn1/asn1.go | 2 +- src/encoding/gob/error.go | 2 +- src/encoding/gob/type.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/encoding/asn1/asn1.go b/src/encoding/asn1/asn1.go index 4408352cff6..6a7aa473a5c 100644 --- a/src/encoding/asn1/asn1.go +++ b/src/encoding/asn1/asn1.go @@ -111,7 +111,7 @@ func parseInt64(bytes []byte) (ret int64, err error) { return } -// parseInt treats the given bytes as a big-endian, signed integer and returns +// parseInt32 treats the given bytes as a big-endian, signed integer and returns // the result. func parseInt32(bytes []byte) (int32, error) { if err := checkInteger(bytes); err != nil { diff --git a/src/encoding/gob/error.go b/src/encoding/gob/error.go index 3c9515b5ed6..9c614e3e3ff 100644 --- a/src/encoding/gob/error.go +++ b/src/encoding/gob/error.go @@ -24,7 +24,7 @@ func errorf(format string, args ...any) { error_(fmt.Errorf("gob: "+format, args...)) } -// error wraps the argument error and uses it as the argument to panic. +// error_ wraps the argument error and uses it as the argument to panic. func error_(err error) { panic(gobError{err}) } diff --git a/src/encoding/gob/type.go b/src/encoding/gob/type.go index 9eec08615e1..3114cb0f98a 100644 --- a/src/encoding/gob/type.go +++ b/src/encoding/gob/type.go @@ -38,7 +38,7 @@ const ( var userTypeCache sync.Map // map[reflect.Type]*userTypeInfo -// validType returns, and saves, the information associated with user-provided type rt. +// validUserType returns, and saves, the information associated with user-provided type rt. // If the user type is not valid, err will be non-nil. To be used when the error handler // is not set up. func validUserType(rt reflect.Type) (*userTypeInfo, error) {