Merge pull request #1539 from codysoyland/1512-metalinter-maligned

Fix linter issues: maligned
This commit is contained in:
Cody Soyland 2018-07-19 11:21:38 -05:00 committed by GitHub
commit 9be45bcd60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 9 deletions

View file

@ -120,6 +120,7 @@ gometalinter: require-gometalinter
--enable=gotypex \
--enable=ineffassign \
--enable=interfacer \
--enable=maligned \
--enable=misspell \
--enable=nakedret \
--enable=unparam \

View file

@ -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?

View file

@ -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"`

View file

@ -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)
}

View file

@ -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

View file

@ -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{}