mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Fix linter issues: unconvert
This commit is contained in:
parent
c7e29b48f9
commit
dc50204846
6 changed files with 8 additions and 7 deletions
1
Makefile
1
Makefile
|
|
@ -123,6 +123,7 @@ gometalinter: require-gometalinter
|
|||
--enable=maligned \
|
||||
--enable=misspell \
|
||||
--enable=nakedret \
|
||||
--enable=unconvert \
|
||||
--enable=unparam \
|
||||
--enable=vet \
|
||||
--exclude "^internal/.*\.pb\.go" \
|
||||
|
|
|
|||
|
|
@ -262,8 +262,8 @@ func (s *attrStore) BlockData(i uint64) (map[uint64]map[string]interface{}, erro
|
|||
defer tx.Rollback()
|
||||
|
||||
// Move to the start of the block.
|
||||
min := u64tob(uint64(i) * attrBlockSize)
|
||||
max := u64tob(uint64(i+1) * attrBlockSize)
|
||||
min := u64tob(i * attrBlockSize)
|
||||
max := u64tob((i + 1) * attrBlockSize)
|
||||
cur := tx.Bucket([]byte("attrs")).Cursor()
|
||||
for k, v := cur.Seek(min); k != nil; k, v = cur.Next() {
|
||||
// Exit if we're past the end of the block.
|
||||
|
|
|
|||
2
cache.go
2
cache.go
|
|
@ -114,7 +114,7 @@ func (c *lruCache) Top() []bitmapPair {
|
|||
for id, n := range c.counts {
|
||||
a = append(a, bitmapPair{
|
||||
ID: id,
|
||||
Count: uint64(n),
|
||||
Count: n,
|
||||
})
|
||||
}
|
||||
sort.Sort(bitmapPairs(a))
|
||||
|
|
|
|||
4
field.go
4
field.go
|
|
@ -1072,9 +1072,9 @@ func (f *Field) importValue(columnIDs []uint64, values []int64) error {
|
|||
dataByFragment := make(map[importKey]importValueData)
|
||||
for i := range columnIDs {
|
||||
columnID, value := columnIDs[i], values[i]
|
||||
if int64(value) > bsig.Max {
|
||||
if value > bsig.Max {
|
||||
return fmt.Errorf("%v, columnID=%v, value=%v", ErrBSIGroupValueTooHigh, columnID, value)
|
||||
} else if int64(value) < bsig.Min {
|
||||
} else if value < bsig.Min {
|
||||
return fmt.Errorf("%v, columnID=%v, value=%v", ErrBSIGroupValueTooLow, columnID, value)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ func (m *Command) SetupServer() error {
|
|||
|
||||
diagnosticsInterval := time.Duration(0)
|
||||
if m.Config.Metric.Diagnostics {
|
||||
diagnosticsInterval = time.Duration(defaultDiagnosticsInterval)
|
||||
diagnosticsInterval = defaultDiagnosticsInterval
|
||||
}
|
||||
|
||||
statsClient, err := newStatsClient(m.Config.Metric.Service, m.Config.Metric.Host)
|
||||
|
|
|
|||
|
|
@ -862,7 +862,7 @@ func (idx *index) lookupKey(offset int64) []byte {
|
|||
func (idx *index) alloc(capacity uint64) {
|
||||
idx.elems = make([]elem, capacity)
|
||||
idx.threshold = (capacity * uint64(idx.loadFactor)) / 100
|
||||
idx.mask = uint64(capacity - 1)
|
||||
idx.mask = capacity - 1
|
||||
}
|
||||
|
||||
func (idx *index) dist(hash, i uint64) uint64 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue