mirror of
https://github.com/golang/go
synced 2024-09-18 15:32:18 +00:00
spec: better comment in example for type definition
The old comment for the example type PtrMutex *Mutex talked about the method set of the base type of PtrMutex. It's more direct and clearer to talk about the underlying type of PtrMutex for this specific example. Also removed link inside pre-formatted region of text. Fixes #20900. Change-Id: Ie37340e53670e34ebe13e780ba8ccb1bba67795c Reviewed-on: https://go-review.googlesource.com/55070 Reviewed-by: Rob Pike <r@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
629b5e7561
commit
5abc8c897c
|
@ -1,6 +1,6 @@
|
|||
<!--{
|
||||
"Title": "The Go Programming Language Specification",
|
||||
"Subtitle": "Version of June 28, 2017",
|
||||
"Subtitle": "Version of August 14, 2017",
|
||||
"Path": "/ref/spec"
|
||||
}-->
|
||||
|
||||
|
@ -1946,7 +1946,7 @@ func (m *Mutex) Unlock() { /* Unlock implementation */ }
|
|||
// NewMutex has the same composition as Mutex but its method set is empty.
|
||||
type NewMutex Mutex
|
||||
|
||||
// The method set of the <a href="#Pointer_types">base type</a> of PtrMutex remains unchanged,
|
||||
// The method set of PtrMutex's underlying type *Mutex remains unchanged,
|
||||
// but the method set of PtrMutex is empty.
|
||||
type PtrMutex *Mutex
|
||||
|
||||
|
|
Loading…
Reference in a new issue