googleapis / googleapis/google-cloud-go
firestore: when decoding into a short slice, try to grow it
Open
api: firestore
next major: breaking change
semver: major
type: feature request
- Dominant language
- Go
- Stars
- 4.5k
- Forks
- 1.6k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 109
Description
There is a case when decoding values that doesn't match the behavior of `encoding/json`. When decoding an array value that is too large for the slice we create a new slice (https://code.googlesource.com/gocloud/+/v0.34.0/firestore/from_value.go#186). The json code grows the existing slice (https://go.googlesource.com/go/+/go1.11.4/src/encoding/json/decode.go#556).
This is a behavior change, so it should be fixed before leaving beta.
Contributor guide
Assessment
This issue has not been assessed yet.