googleapis / googleapis/google-cloud-go

firestore: when decoding into a short slice, try to grow it

Open
#1,267 5 comments 0 reactions 1 assignee Assigned to @bhshkh View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.