fix linter issues

This commit is contained in:
Matt Jaffee 2018-10-08 19:10:16 -05:00
parent cbd7e945b2
commit e2bbcb28e5
No known key found for this signature in database
GPG key ID: 08A3DFFF987B11BF
3 changed files with 6 additions and 5 deletions

View file

@ -1016,8 +1016,8 @@ func decodeGroupCounts(a []*internal.GroupCount) []pilosa.GroupCount {
other := make([]pilosa.GroupCount, len(a))
for i := range a {
other[i] = pilosa.GroupCount{
decodeFieldRows(a[i].Group),
a[i].Count,
Group: decodeFieldRows(a[i].Group),
Count: a[i].Count,
}
}
return other

View file

@ -879,7 +879,7 @@ func mergeGroupCounts(gc, other []GroupCount) []GroupCount {
return gc
}
func (e *executor) executeGroupByShard(ctx context.Context, index string, c *pql.Call, shard uint64, childRows []RowIDs) ([]GroupCount, error) {
func (e *executor) executeGroupByShard(_ context.Context, index string, c *pql.Call, shard uint64, childRows []RowIDs) ([]GroupCount, error) {
// Fetch index.
idx := e.Holder.Index(index)
if idx == nil {
@ -988,7 +988,7 @@ func (e *executor) executeRows(ctx context.Context, index string, c *pql.Call, s
return results, nil
}
func (e *executor) executeRowsShard(ctx context.Context, index string, c *pql.Call, shard uint64) (RowIDs, error) {
func (e *executor) executeRowsShard(_ context.Context, index string, c *pql.Call, shard uint64) (RowIDs, error) {
// Fetch index.
idx := e.Holder.Index(index)
if idx == nil {

View file

@ -1795,8 +1795,9 @@ func (f *fragment) rows(start uint64, filters ...rowFilter) []uint64 {
}
// apply filters
addRow, done := true, false
addRow := true
for _, filter := range filters {
var done bool
addRow, done = filter(vRow, key, c)
if done {
return rows