Merge pull request #128 from NickyBoy89/master

This commit is contained in:
Tnze
2021-11-12 08:04:07 +08:00
committed by GitHub

View File

@ -62,7 +62,7 @@ func (a Ary) ReadFrom(r io.Reader) (n int64, err error) {
array = array.Elem() array = array.Elem()
} }
if !array.CanAddr() { if !array.CanAddr() {
panic(errors.New("the Ary is not addressable")) panic(errors.New("the contents of the Ary are not addressable"))
} }
if array.Cap() < length { if array.Cap() < length {
array.Set(reflect.MakeSlice(array.Type(), length, length)) array.Set(reflect.MakeSlice(array.Type(), length, length))