Skip to content

Commit e0cd905

Browse files
cuishuanggopherbot
authored andcommitted
reflect: add available godoc link
Change-Id: Ib199ce1a781e8e3a66d3dc8bda617e6bc30b290e Reviewed-on: https://go-review.googlesource.com/c/go/+/539578 Auto-Submit: Ian Lance Taylor <[email protected]> Run-TryBot: shuang cui <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: qiulaidongfeng <[email protected]>
1 parent daaf1f2 commit e0cd905

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/reflect/arena.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ package reflect
88

99
import "arena"
1010

11-
// ArenaNew returns a Value representing a pointer to a new zero value for the
11+
// ArenaNew returns a [Value] representing a pointer to a new zero value for the
1212
// specified type, allocating storage for it in the provided arena. That is,
13-
// the returned Value's Type is PointerTo(typ).
13+
// the returned Value's Type is [PointerTo](typ).
1414
func ArenaNew(a *arena.Arena, typ Type) Value {
1515
return ValueOf(arena_New(a, PointerTo(typ)))
1616
}

src/reflect/makefunc.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,22 @@ type makeFuncImpl struct {
2222
fn func([]Value) []Value
2323
}
2424

25-
// MakeFunc returns a new function of the given Type
25+
// MakeFunc returns a new function of the given [Type]
2626
// that wraps the function fn. When called, that new function
2727
// does the following:
2828
//
2929
// - converts its arguments to a slice of Values.
3030
// - runs results := fn(args).
3131
// - returns the results as a slice of Values, one per formal result.
3232
//
33-
// The implementation fn can assume that the argument Value slice
33+
// The implementation fn can assume that the argument [Value] slice
3434
// has the number and type of arguments given by typ.
3535
// If typ describes a variadic function, the final Value is itself
3636
// a slice representing the variadic arguments, as in the
3737
// body of a variadic function. The result Value slice returned by fn
3838
// must have the number and type of results given by typ.
3939
//
40-
// The Value.Call method allows the caller to invoke a typed function
40+
// The [Value.Call] method allows the caller to invoke a typed function
4141
// in terms of Values; in contrast, MakeFunc allows the caller to implement
4242
// a typed function in terms of Values.
4343
//

src/reflect/type.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,7 @@ type StructTag string
962962
// If there is no such key in the tag, Get returns the empty string.
963963
// If the tag does not have the conventional format, the value
964964
// returned by Get is unspecified. To determine whether a tag is
965-
// explicitly set to the empty string, use Lookup.
965+
// explicitly set to the empty string, use [StructTag.Lookup].
966966
func (tag StructTag) Get(key string) string {
967967
v, _ := tag.Lookup(key)
968968
return v

src/reflect/value.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
// inappropriate to the kind of type causes a run time panic.
2525
//
2626
// The zero Value represents no value.
27-
// Its IsValid method returns false, its Kind method returns Invalid,
27+
// Its [Value.IsValid] method returns false, its Kind method returns [Invalid],
2828
// its String method returns "<invalid Value>", and all other methods panic.
2929
// Most functions and methods never return an invalid value.
3030
// If one does, its documentation states the conditions explicitly.
@@ -1541,7 +1541,7 @@ func (v Value) InterfaceData() [2]uintptr {
15411541
// a chan, func, interface, map, pointer, or slice value; if it is
15421542
// not, IsNil panics. Note that IsNil is not always equivalent to a
15431543
// regular comparison with nil in Go. For example, if v was created
1544-
// by calling ValueOf with an uninitialized interface variable i,
1544+
// by calling [ValueOf] with an uninitialized interface variable i,
15451545
// i==nil will be true but v.IsNil will panic as v will be the zero
15461546
// Value.
15471547
func (v Value) IsNil() bool {
@@ -1566,7 +1566,7 @@ func (v Value) IsNil() bool {
15661566

15671567
// IsValid reports whether v represents a value.
15681568
// It returns false if v is the zero Value.
1569-
// If IsValid returns false, all other methods except String panic.
1569+
// If [Value.IsValid] returns false, all other methods except String panic.
15701570
// Most functions and methods never return an invalid Value.
15711571
// If one does, its documentation states the conditions explicitly.
15721572
func (v Value) IsValid() bool {
@@ -2503,7 +2503,7 @@ func (v Value) SetUint(x uint64) {
25032503
}
25042504

25052505
// SetPointer sets the [unsafe.Pointer] value v to x.
2506-
// It panics if v's Kind is not UnsafePointer.
2506+
// It panics if v's Kind is not [UnsafePointer].
25072507
func (v Value) SetPointer(x unsafe.Pointer) {
25082508
v.mustBeAssignable()
25092509
v.mustBe(UnsafePointer)
@@ -3054,7 +3054,7 @@ const (
30543054
// then the case is ignored, and the field Send will also be ignored and may be either zero
30553055
// or non-zero.
30563056
//
3057-
// If Dir is SelectRecv, the case represents a receive operation.
3057+
// If Dir is [SelectRecv], the case represents a receive operation.
30583058
// Normally Chan's underlying value must be a channel and Send must be a zero Value.
30593059
// If Chan is a zero Value, then the case is ignored, but Send must still be a zero Value.
30603060
// When a receive operation is selected, the received Value is returned by Select.
@@ -3281,7 +3281,7 @@ func Zero(typ Type) Value {
32813281
var zeroVal [abi.ZeroValSize]byte
32823282

32833283
// New returns a Value representing a pointer to a new zero value
3284-
// for the specified type. That is, the returned Value's Type is PointerTo(typ).
3284+
// for the specified type. That is, the returned Value's Type is [PointerTo](typ).
32853285
func New(typ Type) Value {
32863286
if typ == nil {
32873287
panic("reflect: New(nil)")

0 commit comments

Comments
 (0)