From: cui fliter Date: Wed, 27 Sep 2023 02:54:14 +0000 (+0800) Subject: all: fix misuses of "a" vs "an" X-Git-Tag: go1.22rc1~741 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=11084a9a1e6118a4492aa5d40df5c972c8aac1eb;p=gostls13.git all: fix misuses of "a" vs "an" Fixes the misuse of "a" vs "an", according to English grammatical expectations and using https://www.a-or-an.com/ Change-Id: Ic9600dcbb3d843880349729478266c4b9bcf7316 Reviewed-on: https://go-review.googlesource.com/c/go/+/531335 Run-TryBot: shuang cui Auto-Submit: Ian Lance Taylor Reviewed-by: Ian Lance Taylor Reviewed-by: Bryan Mills TryBot-Result: Gopher Robot --- diff --git a/src/cmd/compile/internal/types2/errors.go b/src/cmd/compile/internal/types2/errors.go index 7db06d944d..90c54d172e 100644 --- a/src/cmd/compile/internal/types2/errors.go +++ b/src/cmd/compile/internal/types2/errors.go @@ -250,7 +250,7 @@ func (check *Checker) err(at poser, code Code, msg string, soft bool) { pos = check.errpos } - // If we have an URL for error codes, add a link to the first line. + // If we have a URL for error codes, add a link to the first line. if code != 0 && check.conf.ErrorURL != "" { u := fmt.Sprintf(check.conf.ErrorURL, code) if i := strings.Index(msg, "\n"); i >= 0 { diff --git a/src/go/types/errors.go b/src/go/types/errors.go index 14d0383e37..2653f9c6c0 100644 --- a/src/go/types/errors.go +++ b/src/go/types/errors.go @@ -228,7 +228,7 @@ func (check *Checker) report(errp *error_) { panic("no error code provided") } - // If we have an URL for error codes, add a link to the first line. + // If we have a URL for error codes, add a link to the first line. if errp.code != 0 && check.conf._ErrorURL != "" { u := fmt.Sprintf(check.conf._ErrorURL, errp.code) if i := strings.Index(msg, "\n"); i >= 0 { diff --git a/src/syscall/js/js.go b/src/syscall/js/js.go index 2515b4f9ca..f7e32eb366 100644 --- a/src/syscall/js/js.go +++ b/src/syscall/js/js.go @@ -576,7 +576,7 @@ func CopyBytesToGo(dst []byte, src Value) int { n, ok := copyBytesToGo(dst, src.ref) runtime.KeepAlive(src) if !ok { - panic("syscall/js: CopyBytesToGo: expected src to be an Uint8Array or Uint8ClampedArray") + panic("syscall/js: CopyBytesToGo: expected src to be a Uint8Array or Uint8ClampedArray") } return n } @@ -591,7 +591,7 @@ func CopyBytesToJS(dst Value, src []byte) int { n, ok := copyBytesToJS(dst.ref, src) runtime.KeepAlive(dst) if !ok { - panic("syscall/js: CopyBytesToJS: expected dst to be an Uint8Array or Uint8ClampedArray") + panic("syscall/js: CopyBytesToJS: expected dst to be a Uint8Array or Uint8ClampedArray") } return n }