Fix latest staticcheck errors and let travis test it
This commit is contained in:
parent
c80e8fe010
commit
2e49d522ec
|
@ -33,6 +33,7 @@ jobs:
|
|||
- name: "Golint, go vet, binary builds"
|
||||
script:
|
||||
- go get -u golang.org/x/lint/golint
|
||||
- go get honnef.co/go/tools/cmd/staticcheck
|
||||
- make check
|
||||
- make service
|
||||
- make ctl
|
||||
|
|
1
Makefile
1
Makefile
|
@ -30,6 +30,7 @@ follow:
|
|||
check:
|
||||
go vet ./...
|
||||
golint -set_exit_status -min_confidence 0.3 ./...
|
||||
staticcheck ./...
|
||||
|
||||
test:
|
||||
go test -v ./...
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
package pb
|
||||
|
||||
import (
|
||||
//lint:ignore SA1019 protobuf generates deprecated imports
|
||||
proto "github.com/golang/protobuf/proto"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
|
|
|
@ -1310,7 +1310,7 @@ func checkPinType(pin *api.Pin) error {
|
|||
// and set the replication factors and ensure that the pinType matches the
|
||||
// metadata consistently.
|
||||
func (c *Cluster) setupPin(ctx context.Context, pin, existing *api.Pin) error {
|
||||
ctx, span := trace.StartSpan(ctx, "cluster/setupPin")
|
||||
_, span := trace.StartSpan(ctx, "cluster/setupPin")
|
||||
defer span.End()
|
||||
|
||||
err := c.setupReplicationFactor(pin)
|
||||
|
|
Loading…
Reference in New Issue
Block a user