From bd140ee5e16af2b909d7508a84d5f73ebc8c9e37 Mon Sep 17 00:00:00 2001 From: Seebs Date: Fri, 13 Jan 2023 16:50:06 -0600 Subject: [PATCH] don't return prematurely from loop. thanks, staticcheck! --- ctl/restore.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ctl/restore.go b/ctl/restore.go index 68ba165c8..423f6ba67 100644 --- a/ctl/restore.go +++ b/ctl/restore.go @@ -360,7 +360,10 @@ func (cmd *RestoreCommand) restoreShard(ctx context.Context, filename string) er pilosa.GetHTTPClient(cmd.tlsConfig, pilosa.ClientResponseHeaderTimeoutOption(time.Second*3)), pilosa.WithClientRetryPeriod(cmd.RetryPeriod), pilosa.WithSerializer(proto.Serializer{})) - return client.RestoreShard(ctx, indexName, shard, bytes.NewBuffer(data)) + err = client.RestoreShard(ctx, indexName, shard, bytes.NewBuffer(data)) + if err != nil { + return err + } } return nil }