Fix err shadowing in gcs driver

Signed-off-by: Oleg Bulatov <oleg@bulatov.me>
This commit is contained in:
Oleg Bulatov 2020-03-18 11:38:35 +01:00
parent 303f1899bb
commit cdb4ba947a
No known key found for this signature in database
GPG Key ID: 51574882800C5922
1 changed files with 2 additions and 1 deletions

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