mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Upgrade golangci-lint to v1.50.1 (#60379)
This commit is contained in:
parent
efd827fd65
commit
b7fc837c35
@ -29,11 +29,11 @@ $(DRONE): $(BINGO_DIR)/drone.mod
|
|||||||
@echo "(re)installing $(GOBIN)/drone-v1.5.0"
|
@echo "(re)installing $(GOBIN)/drone-v1.5.0"
|
||||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.5.0 "github.com/drone/drone-cli/drone"
|
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.5.0 "github.com/drone/drone-cli/drone"
|
||||||
|
|
||||||
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.49.0
|
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.50.1
|
||||||
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
|
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
|
||||||
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
|
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
|
||||||
@echo "(re)installing $(GOBIN)/golangci-lint-v1.49.0"
|
@echo "(re)installing $(GOBIN)/golangci-lint-v1.50.1"
|
||||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.49.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.50.1 "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||||
|
|
||||||
JB := $(GOBIN)/jb-v0.5.1
|
JB := $(GOBIN)/jb-v0.5.1
|
||||||
$(JB): $(BINGO_DIR)/jb.mod
|
$(JB): $(BINGO_DIR)/jb.mod
|
||||||
|
@ -2,4 +2,4 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
|||||||
|
|
||||||
go 1.19
|
go 1.19
|
||||||
|
|
||||||
require github.com/golangci/golangci-lint v1.49.0 // cmd/golangci-lint
|
require github.com/golangci/golangci-lint v1.50.1 // cmd/golangci-lint
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -12,7 +12,7 @@ BRA="${GOBIN}/bra-v0.0.0-20200517080246-1e3013ecaff8"
|
|||||||
|
|
||||||
DRONE="${GOBIN}/drone-v1.5.0"
|
DRONE="${GOBIN}/drone-v1.5.0"
|
||||||
|
|
||||||
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.49.0"
|
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.50.1"
|
||||||
|
|
||||||
JB="${GOBIN}/jb-v0.5.1"
|
JB="${GOBIN}/jb-v0.5.1"
|
||||||
|
|
||||||
|
@ -6,8 +6,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"github.com/grafana/grafana/pkg/infra/tracing"
|
|
||||||
"go.opentelemetry.io/otel/attribute"
|
"go.opentelemetry.io/otel/attribute"
|
||||||
|
|
||||||
|
"github.com/grafana/grafana/pkg/infra/tracing"
|
||||||
)
|
)
|
||||||
|
|
||||||
// HandlerFunc defines a handler function interface.
|
// HandlerFunc defines a handler function interface.
|
||||||
@ -16,16 +17,16 @@ type HandlerFunc interface{}
|
|||||||
// Msg defines a message interface.
|
// Msg defines a message interface.
|
||||||
type Msg interface{}
|
type Msg interface{}
|
||||||
|
|
||||||
// ErrHandlerNotFound defines an error if a handler is not found
|
// ErrHandlerNotFound defines an error if a handler is not found.
|
||||||
var ErrHandlerNotFound = errors.New("handler not found")
|
var ErrHandlerNotFound = errors.New("handler not found")
|
||||||
|
|
||||||
// Bus type defines the bus interface structure
|
// Bus type defines the bus interface structure.
|
||||||
type Bus interface {
|
type Bus interface {
|
||||||
Publish(ctx context.Context, msg Msg) error
|
Publish(ctx context.Context, msg Msg) error
|
||||||
AddEventListener(handler HandlerFunc)
|
AddEventListener(handler HandlerFunc)
|
||||||
}
|
}
|
||||||
|
|
||||||
// InProcBus defines the bus structure
|
// InProcBus defines the bus structure.
|
||||||
type InProcBus struct {
|
type InProcBus struct {
|
||||||
listeners map[string][]HandlerFunc
|
listeners map[string][]HandlerFunc
|
||||||
tracer tracing.Tracer
|
tracer tracing.Tracer
|
||||||
@ -38,7 +39,7 @@ func ProvideBus(tracer tracing.Tracer) *InProcBus {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// PublishCtx function publish a message to the bus listener.
|
// Publish function publish a message to the bus listener.
|
||||||
func (b *InProcBus) Publish(ctx context.Context, msg Msg) error {
|
func (b *InProcBus) Publish(ctx context.Context, msg Msg) error {
|
||||||
var msgName = reflect.TypeOf(msg).Elem().Name()
|
var msgName = reflect.TypeOf(msg).Elem().Name()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user