Merge pull request #3127 from dmage/err-shadow

Fix err shadowing in gcs driver
This commit is contained in:
Derek McGowan 2020-03-19 10:36:57 -07:00 committed by GitHub
commit 742aab907b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -426,7 +426,8 @@ func putContentsClose(wc *storage.Writer, contents []byte) error {
var nn int
var err error
for nn < size {
n, err := wc.Write(contents[nn:size])
var n int
n, err = wc.Write(contents[nn:size])
nn += n
if err != nil {
break