]> Cypherpunks repositories - gostls13.git/commitdiff
types2, go/types: remove doc link from Func.Pkg comment
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Wed, 11 Oct 2023 08:34:09 +0000 (15:34 +0700)
committerGopher Robot <gobot@golang.org>
Wed, 11 Oct 2023 12:48:03 +0000 (12:48 +0000)
The documentation link only works with exported identifiers. Further,
the built-in error interface lives in pseudo package "builtin" only,
thus it's not a real package that can be referred using doc links.

Change-Id: I2116beb27fc73ba33f8352301fe77b4b6abc3ec1
Reviewed-on: https://go-review.googlesource.com/c/go/+/534436
Reviewed-by: Robert Findley <rfindley@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
src/cmd/compile/internal/types2/object.go
src/go/types/object.go

index 075712dc9ccfeaaa0abdf46fd64d451e309734a1..591adeac3da31449901247edf80614af75c86b09 100644 (file)
@@ -409,7 +409,7 @@ func (obj *Func) Origin() *Func {
 // Pkg returns the package to which the function belongs.
 //
 // The result is nil for methods of types in the Universe scope,
-// like [error.Error].
+// like method Error of the error built-in interface type.
 func (obj *Func) Pkg() *Package { return obj.object.Pkg() }
 
 // hasPtrRecv reports whether the receiver is of the form *T for the given method obj.
index 17c15d48b4f2264475ac535b523ba8ed243160c0..41fabfd051897a23d0d233720f76b01c1b6eec71 100644 (file)
@@ -411,7 +411,7 @@ func (obj *Func) Origin() *Func {
 // Pkg returns the package to which the function belongs.
 //
 // The result is nil for methods of types in the Universe scope,
-// like [error.Error].
+// like method Error of the error built-in interface type.
 func (obj *Func) Pkg() *Package { return obj.object.Pkg() }
 
 // hasPtrRecv reports whether the receiver is of the form *T for the given method obj.