mirror of
https://github.com/golang/go
synced 2024-11-18 15:44:41 -07:00
reflect: document that Value.Slice panics on an unaddressable array.
Fixes #4736. R=rsc CC=golang-dev https://golang.org/cl/7239045
This commit is contained in:
parent
2ccd4e9f87
commit
11d16dc535
@ -1448,7 +1448,7 @@ func (v Value) SetString(x string) {
|
||||
}
|
||||
|
||||
// Slice returns a slice of v.
|
||||
// It panics if v's Kind is not Array, Slice, or String.
|
||||
// It panics if v's Kind is not Array, Slice or String, or if v is an unaddressable array.
|
||||
func (v Value) Slice(beg, end int) Value {
|
||||
var (
|
||||
cap int
|
||||
|
Loading…
Reference in New Issue
Block a user