deal with linter false positives

This commit is contained in:
Nia Weiss 2020-10-21 14:50:50 -04:00
parent c9928b0c7f
commit 8474854dd3
No known key found for this signature in database
GPG key ID: 895E83409BFDA1BB

View file

@ -4179,8 +4179,7 @@ func (e *executor) collectCallKeysNew(dst *keyCollector, c *pql.Call, index stri
if keyed {
opts = append(opts, OptFieldKeys())
}
f, err = idx.CreateField(field, opts...)
if err != nil {
if _, err := idx.CreateField(field, opts...); err != nil {
// We wrap these because we want to indicate that it wasn't found,
// but also the problem we encountered trying to create it.
return newNotFoundError(errors.Wrapf(err, "creating field %q", field))