mirror of
https://github.com/project-zot/zot.git
synced 2025-03-11 02:17:43 -05:00
update linter version to 1.46.2
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
parent
32afe712d6
commit
287ac05ddc
6 changed files with 12 additions and 7 deletions
2
.github/workflows/golangci-lint.yaml
vendored
2
.github/workflows/golangci-lint.yaml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
|||
uses: golangci/golangci-lint-action@v2
|
||||
with:
|
||||
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
|
||||
version: v1.45.2
|
||||
version: v1.46.2
|
||||
|
||||
# Optional: working directory, useful for monorepos
|
||||
# working-directory: somedir
|
||||
|
|
2
Makefile
2
Makefile
|
@ -9,7 +9,7 @@ TOOLSDIR := $(shell pwd)/hack/tools
|
|||
PATH := bin:$(TOOLSDIR)/bin:$(PATH)
|
||||
STACKER := $(shell which stacker)
|
||||
GOLINTER := $(TOOLSDIR)/bin/golangci-lint
|
||||
GOLINTER_VERSION := v1.45.2
|
||||
GOLINTER_VERSION := v1.46.2
|
||||
NOTATION := $(TOOLSDIR)/bin/notation
|
||||
BATS := $(TOOLSDIR)/bin/bats
|
||||
TESTDATA := $(TOP_LEVEL)/test/data
|
||||
|
|
|
@ -5,7 +5,7 @@ run:
|
|||
|
||||
linters:
|
||||
enable-all: true
|
||||
disable: funlen,gocognit,exhaustivestruct,paralleltest,forbidigo,ireturn,wrapcheck,exhaustive,maintidx
|
||||
disable: funlen,gocognit,exhaustivestruct,paralleltest,forbidigo,ireturn,wrapcheck,exhaustive,maintidx,exhaustruct
|
||||
|
||||
linters-settings:
|
||||
dupl:
|
||||
|
|
|
@ -3,6 +3,7 @@ package cli
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
|
@ -86,7 +87,7 @@ func newScrubCmd(conf *config.Config) *cobra.Command {
|
|||
// checking if the server is already running
|
||||
req, err := http.NewRequestWithContext(context.Background(),
|
||||
http.MethodGet,
|
||||
fmt.Sprintf("http://%s:%s/v2", conf.HTTP.Address, conf.HTTP.Port),
|
||||
fmt.Sprintf("http://%s/v2", net.JoinHostPort(conf.HTTP.Address, conf.HTTP.Port)),
|
||||
nil)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("unable to create a new http request")
|
||||
|
|
|
@ -6,6 +6,7 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
"path"
|
||||
|
@ -13,7 +14,8 @@ import (
|
|||
"testing"
|
||||
|
||||
godigest "github.com/opencontainers/go-digest"
|
||||
ispec "github.com/opencontainers/image-spec/specs-go/v1" // nolint: goimports
|
||||
// nolint: goimports
|
||||
ispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
// nolint:golint,stylecheck,revive
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"github.com/smartystreets/goconvey/convey/reporting"
|
||||
|
@ -37,7 +39,7 @@ func CheckWorkflows(t *testing.T, config *compliance.Config) {
|
|||
defer outputJSONExit()
|
||||
}
|
||||
|
||||
baseURL := fmt.Sprintf("http://%s:%s", config.Address, config.Port)
|
||||
baseURL := fmt.Sprintf("http://%s", net.JoinHostPort(config.Address, config.Port))
|
||||
|
||||
storageInfo := config.StorageInfo
|
||||
|
||||
|
|
|
@ -116,7 +116,9 @@ func (ms *metricServer) ReceiveMetrics() interface{} {
|
|||
return <-ms.cacheChan
|
||||
}
|
||||
|
||||
func (ms *metricServer) IsEnabled() (b bool) {
|
||||
func (ms *metricServer) IsEnabled() bool {
|
||||
b := false
|
||||
|
||||
// send a bool value on the request channel to avoid data race
|
||||
ms.reqChan <- b
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue