mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 00:55:55 +00:00
Merge pull request #1527 from codysoyland/1509-metalinter-gofmt
Fix linter issues: gofmt
This commit is contained in:
commit
b67bd2bf3f
8 changed files with 37 additions and 38 deletions
2
Makefile
2
Makefile
|
|
@ -109,7 +109,7 @@ docker-test:
|
|||
docker run --rm -v $(PWD):/go/src/$(CLONE_URL) -w /go/src/$(CLONE_URL) golang:$(GO_VERSION) go test -tags='$(BUILD_TAGS)' $(TESTFLAGS) ./...
|
||||
|
||||
metalinter:
|
||||
gometalinter --vendor --disable-all --enable=gotype --enable=gotypex --deadline=60s --exclude "^internal/.*\.pb\.go" ./...
|
||||
gometalinter --vendor --disable-all --enable=gotype --enable=gotypex --enable=gofmt --deadline=60s --exclude "^internal/.*\.pb\.go" ./...
|
||||
|
||||
######################
|
||||
# Build dependencies #
|
||||
|
|
|
|||
44
api.go
44
api.go
|
|
@ -858,32 +858,32 @@ const (
|
|||
)
|
||||
|
||||
var methodsCommon = map[apiMethod]struct{}{
|
||||
apiClusterMessage: struct{}{},
|
||||
apiSetCoordinator: struct{}{},
|
||||
apiClusterMessage: {},
|
||||
apiSetCoordinator: {},
|
||||
}
|
||||
|
||||
var methodsResizing = map[apiMethod]struct{}{
|
||||
apiResizeAbort: struct{}{},
|
||||
apiResizeAbort: {},
|
||||
}
|
||||
|
||||
var methodsNormal = map[apiMethod]struct{}{
|
||||
apiCreateField: struct{}{},
|
||||
apiCreateIndex: struct{}{},
|
||||
apiDeleteField: struct{}{},
|
||||
apiDeleteIndex: struct{}{},
|
||||
apiDeleteView: struct{}{},
|
||||
apiExportCSV: struct{}{},
|
||||
apiFragmentBlockData: struct{}{},
|
||||
apiFragmentBlocks: struct{}{},
|
||||
apiField: struct{}{},
|
||||
apiFieldAttrDiff: struct{}{},
|
||||
apiImport: struct{}{},
|
||||
apiImportValue: struct{}{},
|
||||
apiIndex: struct{}{},
|
||||
apiIndexAttrDiff: struct{}{},
|
||||
apiQuery: struct{}{},
|
||||
apiRecalculateCaches: struct{}{},
|
||||
apiRemoveNode: struct{}{},
|
||||
apiShardNodes: struct{}{},
|
||||
apiViews: struct{}{},
|
||||
apiCreateField: {},
|
||||
apiCreateIndex: {},
|
||||
apiDeleteField: {},
|
||||
apiDeleteIndex: {},
|
||||
apiDeleteView: {},
|
||||
apiExportCSV: {},
|
||||
apiFragmentBlockData: {},
|
||||
apiFragmentBlocks: {},
|
||||
apiField: {},
|
||||
apiFieldAttrDiff: {},
|
||||
apiImport: {},
|
||||
apiImportValue: {},
|
||||
apiIndex: {},
|
||||
apiIndexAttrDiff: {},
|
||||
apiQuery: {},
|
||||
apiRecalculateCaches: {},
|
||||
apiRemoveNode: {},
|
||||
apiShardNodes: {},
|
||||
apiViews: {},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -182,9 +182,9 @@ func TestFragSources(t *testing.T) {
|
|||
to: c2,
|
||||
idx: idx,
|
||||
expected: map[string][]*ResizeSource{
|
||||
"node0": []*ResizeSource{},
|
||||
"node1": []*ResizeSource{},
|
||||
"node2": []*ResizeSource{
|
||||
"node0": {},
|
||||
"node1": {},
|
||||
"node2": {
|
||||
{&Node{"node0", URI{"http", "host0", 10101}, false}, "i", "f", "standard", uint64(0)},
|
||||
{&Node{"node1", URI{"http", "host1", 10101}, false}, "i", "f", "standard", uint64(2)},
|
||||
},
|
||||
|
|
@ -196,10 +196,10 @@ func TestFragSources(t *testing.T) {
|
|||
to: c3,
|
||||
idx: idx,
|
||||
expected: map[string][]*ResizeSource{
|
||||
"node0": []*ResizeSource{
|
||||
"node0": {
|
||||
{&Node{"node1", URI{"http", "host1", 10101}, false}, "i", "f", "standard", uint64(1)},
|
||||
},
|
||||
"node1": []*ResizeSource{
|
||||
"node1": {
|
||||
{&Node{"node0", URI{"http", "host0", 10101}, false}, "i", "f", "standard", uint64(0)},
|
||||
{&Node{"node0", URI{"http", "host0", 10101}, false}, "i", "f", "standard", uint64(2)},
|
||||
},
|
||||
|
|
@ -211,14 +211,14 @@ func TestFragSources(t *testing.T) {
|
|||
to: c4,
|
||||
idx: idx,
|
||||
expected: map[string][]*ResizeSource{
|
||||
"node0": []*ResizeSource{
|
||||
"node0": {
|
||||
{&Node{"node2", URI{"http", "host2", 10101}, false}, "i", "f", "standard", uint64(0)},
|
||||
{&Node{"node2", URI{"http", "host2", 10101}, false}, "i", "f", "standard", uint64(2)},
|
||||
},
|
||||
"node1": []*ResizeSource{
|
||||
"node1": {
|
||||
{&Node{"node0", URI{"http", "host0", 10101}, false}, "i", "f", "standard", uint64(3)},
|
||||
},
|
||||
"node2": []*ResizeSource{},
|
||||
"node2": {},
|
||||
},
|
||||
err: "",
|
||||
},
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ func (ct *commandTest) setupCommand(t *testing.T) *cobra.Command {
|
|||
|
||||
// reset the environment after setup/run of a commandTest.
|
||||
func (ct *commandTest) reset() {
|
||||
for name, _ := range ct.env {
|
||||
for name := range ct.env {
|
||||
os.Setenv(name, "")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
2
field.go
2
field.go
|
|
@ -600,7 +600,7 @@ func (f *Field) viewNames() []string {
|
|||
defer f.mu.Unlock()
|
||||
|
||||
other := make([]string, 0, len(f.viewMap))
|
||||
for viewName, _ := range f.viewMap {
|
||||
for viewName := range f.viewMap {
|
||||
other = append(other, viewName)
|
||||
}
|
||||
return other
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
package test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"github.com/pilosa/pilosa/pql"
|
||||
"testing"
|
||||
)
|
||||
|
||||
|
||||
func TestPQL_Generator(t *testing.T) {
|
||||
t.Run("pql.Query generator", func(t *testing.T) {
|
||||
for _, u := range []struct {
|
||||
|
|
|
|||
|
|
@ -47,8 +47,8 @@ func TestParser_Parse(t *testing.T) {
|
|||
&pql.Call{
|
||||
Name: "Union",
|
||||
Children: []*pql.Call{
|
||||
&pql.Call{Name: "Bitmap"},
|
||||
&pql.Call{Name: "Count"},
|
||||
{Name: "Bitmap"},
|
||||
{Name: "Count"},
|
||||
},
|
||||
},
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ func TestMain_SendReceiveMessage(t *testing.T) {
|
|||
|
||||
// Expected indexes and Fields
|
||||
expected := map[string][]string{
|
||||
"i": []string{"f"},
|
||||
"i": {"f"},
|
||||
}
|
||||
|
||||
// Create a client for each node.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue