From 532caa0fbfeb4034b64b134dc31419150e918106 Mon Sep 17 00:00:00 2001 From: Travis Date: Mon, 16 Dec 2019 21:56:57 -0600 Subject: [PATCH] fix an impossible code path raised by the linter --- api.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/api.go b/api.go index 151de44a9..af468914f 100644 --- a/api.go +++ b/api.go @@ -1188,13 +1188,10 @@ func (api *API) ImportColumnAttrs(ctx context.Context, req *ImportColumnAttrsReq bulkAttrs[uint64(req.ColumnIDs[n])] = map[string]interface{}{req.AttrKey: req.AttrVals[n]} } if err := index.ColumnAttrStore().SetBulkAttrs(bulkAttrs); err != nil { - return err - } - - if err != nil { api.server.logger.Printf("import error: index=%s, shard=%d, len(columns)=%d, err=%s", req.Index, req.Shard, len(req.ColumnIDs), err) + return errors.Wrap(err, "importing column attrs") } - return errors.Wrap(err, "importing column attrs") + return nil } func importExistenceColumns(index *Index, columnIDs []uint64) error {