mirror of
https://github.com/golang/go
synced 2024-10-02 22:25:08 +00:00
fmt: amend comment for getField
Change-Id: I52c9ed0c1a178f3ae3eb4f135d8f11018075fe3b
GitHub-Last-Rev: 407aa89c88
GitHub-Pull-Request: golang/go#62061
Reviewed-on: https://go-review.googlesource.com/c/go/+/519935
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
parent
51fd0cb3c0
commit
f278ae61d5
|
@ -336,7 +336,7 @@ func Appendln(b []byte, a ...any) []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
// getField gets the i'th field of the struct value.
|
// getField gets the i'th field of the struct value.
|
||||||
// If the field is itself is an interface, return a value for
|
// If the field itself is a non-nil interface, return a value for
|
||||||
// the thing inside the interface, not the interface itself.
|
// the thing inside the interface, not the interface itself.
|
||||||
func getField(v reflect.Value, i int) reflect.Value {
|
func getField(v reflect.Value, i int) reflect.Value {
|
||||||
val := v.Field(i)
|
val := v.Field(i)
|
||||||
|
|
Loading…
Reference in a new issue