mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
Makefile: update golangci-lint from v1.29.0 to v1.40.1
This commit is contained in:
parent
9aa22cccf0
commit
69e365cd48
3 changed files with 6 additions and 2 deletions
2
Makefile
2
Makefile
|
@ -154,7 +154,7 @@ golangci-lint: install-golangci-lint
|
||||||
golangci-lint run --exclude '(SA4003|SA1019|SA5011):' -D errcheck -D structcheck --timeout 2m
|
golangci-lint run --exclude '(SA4003|SA1019|SA5011):' -D errcheck -D structcheck --timeout 2m
|
||||||
|
|
||||||
install-golangci-lint:
|
install-golangci-lint:
|
||||||
which golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.29.0
|
which golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.40.1
|
||||||
|
|
||||||
install-wwhrd:
|
install-wwhrd:
|
||||||
which wwhrd || GO111MODULE=off go get github.com/frapposelli/wwhrd
|
which wwhrd || GO111MODULE=off go get github.com/frapposelli/wwhrd
|
||||||
|
|
|
@ -13,6 +13,7 @@ func TestTLSConfig(t *testing.T) {
|
||||||
}
|
}
|
||||||
if tlsCfg == nil {
|
if tlsCfg == nil {
|
||||||
t.Errorf("expected tlsConfig to be set, got nil")
|
t.Errorf("expected tlsConfig to be set, got nil")
|
||||||
|
return
|
||||||
}
|
}
|
||||||
if tlsCfg.ServerName != serverName {
|
if tlsCfg.ServerName != serverName {
|
||||||
t.Errorf("unexpected ServerName, want %s, got %s", serverName, tlsCfg.ServerName)
|
t.Errorf("unexpected ServerName, want %s, got %s", serverName, tlsCfg.ServerName)
|
||||||
|
|
|
@ -153,7 +153,10 @@ func Stop(addr string) error {
|
||||||
delete(servers, addr)
|
delete(servers, addr)
|
||||||
serversLock.Unlock()
|
serversLock.Unlock()
|
||||||
if s == nil {
|
if s == nil {
|
||||||
logger.Panicf("BUG: there is no http server at %q", addr)
|
err := fmt.Errorf("BUG: there is no http server at %q", addr)
|
||||||
|
logger.Panicf("%s", err)
|
||||||
|
// The return is needed for golangci-lint: SA5011(related information): this check suggests that the pointer can be nil
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
deadline := time.Now().Add(*shutdownDelay).UnixNano()
|
deadline := time.Now().Add(*shutdownDelay).UnixNano()
|
||||||
|
|
Loading…
Reference in a new issue