mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 02:44:59 +00:00
enable staticcheck in ci; remove dead code (#2281)
This commit is contained in:
parent
0aa5efcc51
commit
0d6a92aeaf
3 changed files with 3 additions and 11 deletions
|
|
@ -12,6 +12,7 @@ linters:
|
|||
enable:
|
||||
- govet
|
||||
- gofmt
|
||||
- staticcheck
|
||||
enable-all: false
|
||||
disable-all: true
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import (
|
|||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/connectivity"
|
||||
"google.golang.org/grpc/credentials"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
)
|
||||
|
||||
const maxMsgSize = 1024 * 1024 * 100 // 100 megs ought to be enough for anybody!
|
||||
|
|
@ -63,7 +64,7 @@ func (c *GRPCClient) resetConn() error {
|
|||
creds := credentials.NewTLS(c.tlsConfig)
|
||||
opts = append(opts, grpc.WithTransportCredentials(creds))
|
||||
} else {
|
||||
opts = append(opts, grpc.WithInsecure())
|
||||
opts = append(opts, grpc.WithTransportCredentials(insecure.NewCredentials()))
|
||||
}
|
||||
|
||||
opts = append(opts, grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(maxMsgSize)))
|
||||
|
|
|
|||
|
|
@ -488,16 +488,6 @@ func (c *ShareableCluster) Start() error {
|
|||
|
||||
// Close stops a Cluster
|
||||
func (c *ShareableCluster) Close() error {
|
||||
if c.shared {
|
||||
for i := range c.Nodes {
|
||||
holder := c.GetHolder(i)
|
||||
indexes := holder.Indexes()
|
||||
var indexNames []string
|
||||
for _, idx := range indexes {
|
||||
indexNames = append(indexNames, idx.Name())
|
||||
}
|
||||
}
|
||||
}
|
||||
for i, cc := range c.Nodes {
|
||||
if err := cc.Close(); err != nil {
|
||||
return errors.Wrapf(err, "stopping server %d", i)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue