mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Merge pull request #1539 from codysoyland/1512-metalinter-maligned
Fix linter issues: maligned
This commit is contained in:
commit
9be45bcd60
6 changed files with 10 additions and 9 deletions
1
Makefile
1
Makefile
|
|
@ -120,6 +120,7 @@ gometalinter: require-gometalinter
|
|||
--enable=gotypex \
|
||||
--enable=ineffassign \
|
||||
--enable=interfacer \
|
||||
--enable=maligned \
|
||||
--enable=misspell \
|
||||
--enable=nakedret \
|
||||
--enable=unparam \
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ type nodeAction struct {
|
|||
}
|
||||
|
||||
// cluster represents a collection of nodes.
|
||||
type cluster struct {
|
||||
type cluster struct { // nolint: maligned
|
||||
id string
|
||||
Node *Node
|
||||
Nodes []*Node // TODO phase this out?
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ import (
|
|||
)
|
||||
|
||||
// ImportCommand represents a command for bulk importing data.
|
||||
type ImportCommand struct {
|
||||
type ImportCommand struct { // nolint: maligned
|
||||
// Destination host and port.
|
||||
Host string `json:"host"`
|
||||
|
||||
|
|
|
|||
|
|
@ -88,13 +88,13 @@ func (u updater) update(oldV *roaring.Container, exists bool) (*roaring.Containe
|
|||
// this struct is added to prevent the closure locals from being escaped out to the heap
|
||||
type updater struct {
|
||||
key uint64
|
||||
containerType byte
|
||||
n int
|
||||
containerType byte
|
||||
mapped bool
|
||||
}
|
||||
|
||||
func (btc *bTreeContainers) PutContainerValues(key uint64, containerType byte, n int, mapped bool) {
|
||||
a := updater{key, containerType, n, mapped}
|
||||
a := updater{key, n, containerType, mapped}
|
||||
btc.tree.Put(key, a.update)
|
||||
}
|
||||
|
||||
|
|
|
|||
8
field.go
8
field.go
|
|
@ -1113,13 +1113,13 @@ func (p fieldInfoSlice) Less(i, j int) bool { return p[i].Name < p[j].Name }
|
|||
|
||||
// FieldOptions represents options to set when initializing a field.
|
||||
type FieldOptions struct {
|
||||
Type string `json:"type,omitempty"`
|
||||
CacheType string `json:"cacheType,omitempty"`
|
||||
CacheSize uint32 `json:"cacheSize,omitempty"`
|
||||
Min int64 `json:"min,omitempty"`
|
||||
Max int64 `json:"max,omitempty"`
|
||||
TimeQuantum TimeQuantum `json:"timeQuantum,omitempty"`
|
||||
Keys bool `json:"keys"`
|
||||
CacheSize uint32 `json:"cacheSize,omitempty"`
|
||||
CacheType string `json:"cacheType,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
TimeQuantum TimeQuantum `json:"timeQuantum,omitempty"`
|
||||
}
|
||||
|
||||
// applyDefaultOptions returns a new FieldOptions object
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ const (
|
|||
var _ broadcaster = &Server{}
|
||||
|
||||
// Server represents a holder wrapped by a running HTTP server.
|
||||
type Server struct {
|
||||
type Server struct { // nolint: maligned
|
||||
// Close management.
|
||||
wg sync.WaitGroup
|
||||
closing chan struct{}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue