diff options
| author | Robert Griesemer <gri@google.com> | 2026-03-19 16:37:21 -0700 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2026-03-24 08:22:18 -0700 |
| commit | c7e151d8c46dbf45b580a73ccb5ba5dd5b5cddef (patch) | |
| tree | 852cf635e2a622e0c56ed9bacdb4e95e4e5331b1 /doc | |
| parent | 39267791a4fd5f881e3a43b199de4c7bddf3f179 (diff) | |
| download | go-c7e151d8c46dbf45b580a73ccb5ba5dd5b5cddef.tar.xz | |
spec: s/defined/declared/ in a handful of places (cleanup)
Use "declared" rather than "defined" where referring to a declaration
(rather than a type definition) is more appropriate.
Change-Id: I691b55e05fcdce489e45286c7a88cbd992e80e57
Reviewed-on: https://go-review.googlesource.com/c/go/+/757121
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/go_spec.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html index dbc89421cb..c7b929c2fa 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -2989,7 +2989,7 @@ Its type must be a <a href="#Type_definitions">defined</a> type <code>T</code> o pointer to a defined type <code>T</code>, possibly followed by a list of type parameter names <code>[P1, P2, …]</code> enclosed in square brackets. <code>T</code> is called the receiver <i>base type</i>. A receiver base type cannot be -a pointer or interface type and it must be defined in the same package as the method. +a pointer or interface type and it must be declared in the same package as the method. The method is said to be <i>bound</i> to its receiver base type and the method name is visible only within <a href="#Selectors">selectors</a> for type <code>T</code> or <code>*T</code>. @@ -3410,7 +3410,7 @@ func(ch chan int) { ch <- ACK }(replyChan) <p> Function literals are <i>closures</i>: they may refer to variables -defined in a surrounding function. Those variables are then shared between +declared in a surrounding function. Those variables are then shared between the surrounding function and the function literal, and they survive as long as they are accessible. </p> @@ -8341,7 +8341,7 @@ func init() { … } </pre> <p> -Multiple such functions may be defined per package, even within a single +Multiple such functions may be declared per package, even within a single source file. In the package block, the <code>init</code> identifier can be used only to declare <code>init</code> functions, yet the identifier itself is not <a href="#Declarations_and_scope">declared</a>. Thus @@ -8423,7 +8423,7 @@ type error interface { <p> It is the conventional interface for representing an error condition, with the nil value representing no error. -For instance, a function to read data from a file might be defined: +For instance, a function to read data from a file might be declared: </p> <pre> |
